2011/1/2 Peter Alexander <peter.alexander...@gmail.com>: > That really surprises me that it's a common bug. Isn't it obvious that ! has > higher precedence than &? Or have I totally misunderstood the cause of the > bug? Assembler is "obvious". People don't always get that right either.
The purpose of a higher-level language IMO, is to make it easier for the developer to express his/her intentions, and pitfalls like this should be avoided. IMHO, the most important job of a high-level language is to encourage good programming practices. There's a reason why people aren't seriously using Brainfuck. It's not because it's not turing-complete, it's because it's simply difficult to get right. There's also a reason why "object oriented" languages were invented. It's not because you can't do object-oriented code in C, it's because object orientation in an object-oriented language is easier and more readable. Programming languages is all about encouraging preferred models.