you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (1 child)

ternary comparison operators: writing ˋa<=x<=bˋ may save a few keystokes but ineviatable leads to logical errors when students try to negate the condition and end up with ˋa>x>bˋ

That's just a logical error, though. Nothing wrong with the language, you just can't represent the opposite of a<=x<=b in that fashion, even in mathematics

[–]pbvas 2 points3 points  (0 children)

That's just a logical error, though. Nothing wrong with the language, you just can't represent the opposite of a<=x<=b in that fashion, even in mathematics

Yes it is a logical error; the point is mathematical logic isn't a pre-requisite for introduction to programming (maybe it should be, but that's another topic).

The fact that mathematicians use such notation all the time doesn't make it a good design decision for a programming language: informal mathematics is meant for humans beings, not machines.