3 ms·
Typescript is of course nice and is a great type system but can’t totally paper over the absolutely impoverished base language that is JS. When you use Python a
by rtpg 3y ago
Typescript is of course nice and is a great type system but can’t totally paper over the absolutely impoverished base language that is JS. When you use Python and things like equality do what almost anyone wants instead of checking object identity, it’s real annoying to futz around in TS
- influxmoment 3y ago[1, 3, 12].sort() == [1, 12, 3] 5 in [5] == false
- ptx 3y agoEven setting the sort order aside, just the fact that it both returns the sorted array and also sorts it in-place is not great. I prefer Python's distinction between sorted (returning a sorted copy) and list.sort (sorting in place and returning nothing).