LWN.net Logo

It's a mistake to ignore the customer

It's a mistake to ignore the customer

Posted Dec 7, 2012 0:22 UTC (Fri) by neilbrown (subscriber, #359)
In reply to: It's a mistake to ignore the customer by dakas
Parent article: GNU Guile 2.0.7 released

> That example does not look like you are aware that == has higher precedence than &.

Sorry, but what language did you think I was using? Given that I used "and" and did not include () around the condition of the 'if', it certainly wasn't C. (It is missing a ':' at the end - sorry about that).

Much as I like C, it clearly got some precedence issues wrong. More modern languages do a much better job.


(Log in to post comments)

It's a mistake to ignore the customer

Posted Dec 7, 2012 7:21 UTC (Fri) by mathstuf (subscriber, #69389) [Link]

To be fair, there is a define for 'and' to '&&' in commonly included C headers (I forget which exactly). And since there's LISP floating around, parentheses sort of fade into the background after enough programming in it, so the error(s) made aren't completely obvious. The colon probably would have helped :) .

C alternative tokens

Posted Dec 7, 2012 16:42 UTC (Fri) by dtlin (✭ supporter ✭, #36537) [Link]

#include <iso646.h>
defines macros for C.  They're in C++ by default.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds