Hacker News new | past | comments | ask | show | jobs | submit login

ouch.



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


To clarify: the bug took about 3 minutes to figure out. Learning the evaluation order of procedure arguments is undefined took 20 years though :)


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.


Well: The thing is that it is _not_ fixed. It is defined as unspecified.


Would this be an issue in Common Lisp? I believe CL function arguments are evaluated left-to-right.


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


That's right. The standard says left to right.

It's not good style to exploit that, but you can.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: