Hacker News new | past | comments | ask | show | jobs | submit login

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?




> 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.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: