Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Evaluation Order Sucks

Name: Anonymous 2014-07-14 0:56

Just fixed an error with
array[count++]= foo();
where foo() modified count, in effect writing stuff into the incorrect location.

Haskell's lazy evaluation would have prevented that.

Name: Anonymous 2014-07-15 2:27

>>28
Having multiple references to mutable state is wrong.
Only if you're a stupid Haskeller like OP. Having multiple refs to mutable state allows for efficient broadcasting. E.g. you can have a tree of data with a mutable leaf, there is one mutator of that leaf and several listeners. As soon as the mutator updates the leaf, all the listeners see the change. No expensive sub-tree rebuilding and reallocation required as in immutable data structures. This is very handy in e.g. video games.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List