lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sep 15, 2014, at 3:48 AM, Axel Kittenberger <axkibe@gmail.com> wrote:

> I don't get it? How about, just don't do it? Why should anybody ever do that?
> 
> Altough its not as easy to shoot ones foot with modern high level languages, in almost all of them it is still possible to create code with ill-defined behavior.
> 
> ( I welcome the collection of ill-defined ways to code for academic interests, its sometimes not too easy to find how to. But other than that, who cares? )
> 
> PS: Almost any language has ill-defined behavior by calling a sort with a custom comparator where for example a > b, b > c, c > a
> 

Indeed. One of my interview questions for a C applicant is:

int k = 1;
k = k++ + ++k;

What is the value of k?

—Tim