Sunday, February 6, 2011

Obsure never to be read suggestions for programming languages.

I've always felt that:

if (0 < x < 30) ...;

Should be valid code. I currently don't know any programming languages that put a catch for it in their XBNFs but really it's pretty easy to convert at the compiler and pretty easy to read as well. Far better than:

if ((0 < x) && (x < 30))...;

No comments: