Re: Constructive criticism

new topic     » goto parent     » topic index » view thread      » older message » newer message
jimcbrown said...

Hmm, you would prefer:

#define STACKS stacks[stack] 

No. Preprocessors are a bad idea for an IDE/debugger and thus for a language.

jimcbrown said...

The parser (... thank you, I know what a parser is ...) sees that stacks[stack] isn't used again until its completely replaced, which means that its safe to change s without separating the change from stacks[stack]. So it is smart enough to optimize the copy away.

Where is this optimization in OpenEU's source code? I cannot find it.

Anyway, call a procedure in between and the optimization becomes invalid, because the procedure may modify "stacks[stack]". The problem here is EU's copy semantics where the programmer intended reference semantics. That's what I meant: EU needs references just like any other language.

jimcbrown said...
        s[$-1] = s[$-2]  
        s[$-2] = temp 
         
        stacks[stack] = s    -- COW 

Say what? I see only an O(1) operation occuring here.

Me too.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu