Re:A semantic model for a substantial fragment of C
by agumonkey on Saturday April 01, 2017 @10:11AM
(#14012188)
ouch.
[ Parent
| on HN ]
Re:A semantic model for a substantial fragment of C
by Johnny_Brahms on Saturday April 01, 2017 @02:19PM
(#14013341)
Yup. Did not feel great.
The worst part is that I admitted to writing code that rely on order of evaluation on Hackernews.
To my defense it is _very_ old code that I converted from an even older turbo Pascal program I wrote as a teenager
Re:A semantic model for a substantial fragment of C
by Johnny_Brahms on Saturday April 01, 2017 @04:22PM
(#14013974)
To clarify: the bug took about 3 minutes to figure out. Learning the evaluation order of procedure arguments is undefined took 20 years though :)
Re:A semantic model for a substantial fragment of C
by agumonkey on Saturday April 01, 2017 @06:36PM
(#14014554)
And I had no idea it was officially fixed ordered in standard. I've read mentions in papers but I never realized what they meant.
Re:A semantic model for a substantial fragment of C
by Johnny_Brahms on Wednesday April 05, 2017 @05:10AM
(#14040764)
Well: The thing is that it is _not_ fixed. It is defined as unspecified.
Re:A semantic model for a substantial fragment of C
by sigjuice on Saturday April 01, 2017 @10:19AM
(#14012221)
Would this be an issue in Common Lisp? I believe CL function arguments are evaluated left-to-right.
Re:A semantic model for a substantial fragment of C
by fiddlerwoaroof on Saturday April 01, 2017 @12:40PM
(#14012931)
It is undefined in Common Lisp whether or not the car of a form is resolved to a function before or after the other arguments, iirc