Hacker News new | ask | show | jobs
by hyperhello 24 days ago
These languages were developed for hypertext. Discord is hypertext. The question is why Rust or C++ or anything would be so suitable for developing chat rooms; it’s not even clear why JavaScript would necessarily be slower after being statically compiled.
2 comments

What special affinity does JavaScript have for hypertext?
Besides the obvious (it’s a web browser coevolution) it converts strings as needed, which is undeniably appropriate for the use case. Also indirect memory management and GC is appropriate for the use. It’s just more suited.
It’s not just about speed. Have you ever come across the utter tire fire that is npm? Or the horrors of [object Object]?
Yes, the first one is not required and shouldn’t be used, write your own leftpad then. The second is about as awful as getting NaN, which is to say not, and can be overridden in the prototype anyway if you want more casual logging.