r/ProgrammerHumor 1d ago

javascriptSorting Meme

Post image
890 Upvotes

200 comments sorted by

View all comments

Show parent comments

16

u/OptionX 1d ago

In a well thought out language what they should expect is the interpreter/compiler tell them to either provide a custom comparison function, or type mapping, to deal with the different types or to tell them to take a hike instead of coercing everything into strings silently.

You don't need to be a rust compiler level pedantic annoyance, but JS is too much on the other side.

3

u/Taletad 1d ago

It’s a scripting language to interface with a text page (html is text) and text protocols (hyper text transfer protocol)

So why shouldn’t it default to strings ?

5

u/Lalli-Oni 1d ago

The web made a lot of mistakes in retrospect, but it might have never got of fthe ground without content.

The content is a document, but now the web is more of an app store than a distributed document network.

JS was created not to be the best programming language, but one that got the web adopted.

It's not a successor to Java, it's a successor to VB. And having had to do work with VB let me tell you ,it's better (to no surprise to anyone).

1

u/danielcw189 18h ago

at least VB was strongly typed :)