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 5:25

>>34
Global state is also trivially avoidable in C

And yet many important libraries depend on it. I wish I had been tracking examples but all I can say is I'm disappointed but not surprised by how often this happens.

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.

Maybe so, but C does nothing to enforce this. Not having anything in the global scope makes it that much harder for it to happen by mistake.

No argument here, but I am arguing against using C where possible.

>>36

Can you express your point in a way that doesn't rely on the immutable data structures or some other strawman?

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