This is the most amazing pro-Javascript reply I've ever seen. JS is a kiddie language. Someone think of the children!https://twitter.com/zergius/status/960606120443285504 …
-
-
Replying to @marcan42
TBH, he has a point. There's no specific need for a programming language to imitate the languages commonly considered to be the most mature.
1 reply 0 retweets 0 likes -
Replying to @codahighland @marcan42
Besides, defaulting to a string operation is consistent with join() and split(). Better than sorting with heterogeneous types, which isn't even well-defined.
1 reply 0 retweets 0 likes -
Replying to @codahighland
It's inconsistent with the comparison operators... which is what sort is all about. Comparing things. And would work as intended when the types are homogeneous, as is the case here. That's the only reasonable way to implement this.
2 replies 0 retweets 2 likes -
Replying to @marcan42
Default sort functions are useless outside of toy examples anyway. If you're not passing a comparator, your data is trivial in the first place.
1 reply 0 retweets 0 likes -
Replying to @codahighland
95% of the time I call sort in Python I don't pass a comparator. 75% of the time I don't even pass a key function. Why would sorting "trivial" data not be expected to work as intended?
1 reply 0 retweets 0 likes -
Replying to @marcan42
Clearly we work in different fields. Of course it SHOULD work as intended, but in Python and JS both I'm sorting objects/dicts most of the time.
1 reply 0 retweets 0 likes
75% of the time I'm sorting either a basic data type or a bunch of tuples in lexicographical order (i.e. (key, value)). 20% of the time I'm sorting dicts/objects and just pass a key function (which JS doesn't even support). Only 5% of the time do I need a custom compare.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.