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 6:51

>>38
Thread-safe alternatives in the standard library is a fine thing, but it requires passing around an environment. It's not a big hassle when the environment won't outlive the frame its created in, but it's unattractive to libraries where the environment (or context) would be created close to main and passed all over, along with any other environments.

So it goes. If you don't do that from the start eventually someone will start asking for multiple environments in the same application and then you will really be screwed. Library authors seem to endemically underestimate the need for this.

>>39
We were discussing shared libraries. Random number generation is coupled to IO and is really an operating systems issue; if you want a decent entropy source you are going to need to deal with synchronizing access to some global shared state.

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