Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
Why sorting is harder than it seems | Better HN
Why sorting is harder than it seems
(opens in new tab)
(getgrist.com)
5 points
dsagal
3y ago
2 comments
Share
2 comments
default
newest
oldest
pestatije
3y ago
The problem at hand is not sorting but type safety...brought to you by javascript
dsagal
OP
3y ago
It's not quite type safety, it's all about order, and it's definitely not specific to Javascript. Here's Python3:
>>> sorted([10, 2, math.nan]) [2, 10, nan] >>> sorted([10, math.nan, 2]) [10, nan, 2]
j
/
k
navigate · click thread line to collapse