3 ms·
I think a lot of you are drawing overly broad conclusions from this, according to your predispositions. A good language feature should be intuitive, given a ba
by jmull 9y ago
I think a lot of you are drawing overly broad conclusions from this, according to your predispositions.
A good language feature should be intuitive, given a basic understanding of the feature, and this falls within that.
A JavaScript programmer considering what the relative order of null and 0 is (and therefore how an inequality operator between them would behave) would intuitively conclude, "I don't know, 0 and null don't have a natural relative order. I probably shouldn't be doing that or else I need to go to the spec."
Anyway, you can hardly judge a language feature as bad because it alllows you to do things that don't make sense (in an edge cases, no less)... then what language features in any language be good?
- catnaroek 9y ago> then what language features in any language be good? Those that obey general principles without exception. For example: (0) “Abstraction clients must not rely on implementation details”: parametric polymorphism, abstract data types. (1) “Case analyses must be exhaustive”: algebraic data types and pattern matching. (2) “Make as few assumptions possible about the intended meaning of programs”: principal types.