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 8:54

>>41
The seed still needs to come from somewhere, and just using something like the PID often isn't good enough.

Anyway, if you want to just discuss stdlib rand, POSIX defines a reentrant form (rand_r) for exactly the reasons already discussed.

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