Live data from Hacker News

Why People Shit on JavaScript?

textboard.lol

11–13 of 13 posts

Re: Why People Shit on JavaScript?

#11

Well, my take is that the language isn't that great, but I really really dislike the ecosystem. The sheer amount of code you get, even when using seemingly lightweight dependencies is just such a dumpsterfire. I once ran cloc on a react getting started example. The example, including its dependencies, contained more than 3 times the lines of code than a 3D game engine (targetting PS4/5) + game logic + dependencies fo…

How many lines of code were from devDependencies (i.e., for use while developing) and how many ended up in the final production bundle actually intended to be served to the client?

Re: Why People Shit on JavaScript?

#12
post #3

I’ve always got trouble understanding people saying a PL has « lisp roots » because it has first-class support for functions (aka you can create them on the fly, pass them as values, etc). This is so common today that i don’t find it relevant. To me, the most original / not yet present in mainstream PLs is the fact that lisp code is lisp data (homoiconicity). That is, any programming language feature aimed at manipul…

Am i missing something ?

Basically Brendan Eich, the creator of JavaScript, once said something along the lines that his initial inspiration for the langauge was Scheme, but with a Java-like syntax. People have then taken that quote and run with it until you've reached a point where some people claim JavaScript has "lisp roots"

Re: Why People Shit on JavaScript?

#13

Well, my take is that the language isn't that great, but I really really dislike the ecosystem. The sheer amount of code you get, even when using seemingly lightweight dependencies is just such a dumpsterfire. I once ran cloc on a react getting started example. The example, including its dependencies, contained more than 3 times the lines of code than a 3D game engine (targetting PS4/5) + game logic + dependencies fo…

Honestly I find JavaScript better than, for example, Python on this front. JavaScript is pretty good at splitting up functions into individual packages and even better at using tree shaking to make sure you only ship the code you use. Many other languages have single huge packages that contain every single function vaguely related to a single area and no easy way to grab just one function. Also many language 'hide' most of their 3rd-party LoC inside pre-compiled .so files, rather than having it show up in the source tree.

In one case I has a 150ish LoC Python command line tool that I wanted to package up and distribute, and it came in at over 150 MB because I need a single function from sk-image, which contain 100s of image processing function plus pulls in all of both scipy and numpy as dependencies.

Post reply on HN