Hacker News new | past | comments | ask | show | jobs | submit login

Maybe it's just me but I don't remotely think JS is a bad language since es6. Tooling is another story entirely.



Extremely same feeling here. Ditching IE11 support is a total game-change for the web. ES module imports just work and you don't have to go down a complex bundler rabbit-hole. Template literals make constructing HTML inside JS components a breeze. And if you do reach for a bundler the modern ones like snowpack and vite make the experience incredible with instant hot module reload on change--the feedback loop for development is like nothing I've ever experienced.


The problem with JS is not the tooling per se but the constant "upgrades" for the tools that exist. Sure, this week's hot new thing is Vite, but by this time next year it will be out of date with some other thing we're all supposed to use. In projects from the last 10 years, I see Gulp, Grunt, Webpack, Browserify, and now Vite - all doing mostly the same thing in different ways, with different config files.


You don't have to use any tools, plain old HTML, CSS and javascript still work just like they did 25 years ago.

Tools come and go, they serve a purpose like writing code in a more futuristic style and compiling it down to a broader browser support base. There will always be a treadmill like that in any language. Look at how C++ has evolved from its 90's roots to more modern C++11, 14, and 17 styles--each change also required more work for the tooling, compilers, build systems, etc. to learn. It's just in the C++ world there are far less people working on tools than in the web world.


I know someone using Gulp today for a successful web site. They don't have any worries.


What other languages have you been exposed to?


I’ve used quite a few. What are the popular scripting languages to compare with? Python, Ruby, PHP are probably the only real competitors (disregarding others like VB or Perl).

Functional programming is very difficult in those languages due to weird closures, bad lambdas, weird block/proc/lambda rules, etc. async from the ground up means that concurrency story is much better and allows lots of threading (with libuv or whatever low level library handling the difficult parts).

JS used to have less ergonomic syntax, but has benefited from adding it last, so it usually chooses the best version.

Stability of JS is much better. When the implementation is the spec, there are bound to be lots of little breakages. Asa result, there’s not much room for alternative implementations.

Tooling is far better than any other scripting language. Debugging and introspection tools are second to none in the category. All these other languages have broken compatibility so that old software won’t run on new versions. Webpack gets hate, but what other scripting language bundles its output? Babel gets hate, but if Python had something similar, the v2/3 switch would have been no big deal and all the “I can’t use that because REHL doesn’t support that version yet wouldn’t be an issue either. Likewise, minifiers reduce download size, improve performance by removing and simplifying parts of the code and improve parse time, but other scripting languages don’t bother.

Type support via typescript is miles ahead of the competition.

Finally, performance is one or even two orders of magnitude better compared to other scripting languages (luaJIT being a notable exception). In fact, modern JS JITs can come very close to the performance of Java or even C in many cases.

JavaScript isn’t the end all, be all of programming, but it’sa very solid choice with good reasons to like it.


Have you tried Elixir or any Scheme? If the scope is dynamic languages, both put JavaScript to shame with much more power, useful tools and far fewer non-sensical footguns.

If the scope is programming languages in general, since it was stated that JS isn't a "bad language" after all, then you can include a long, long list of type-safe languages that are much better for dealing with both its role in the browser and in the backend. Elm, Reason, F#, OCaml, Scala, Kotlin, Swift, Rust, Haskell, to name a few.


I necessarily confined myself to popular languages because of all the advantages that brings. If I could choose any language and magically have an awesome ecosystem, I'd definitely choose StandardML with my second choice being Scheme.

Most of the languages you mention are as fast or faster than JS. Most of them are also much more niche. Tooling for most of them is lacking. Others drag around a huge ball and chain in the form of the JVM or .NET (even the light versions are generally much bigger than v8).

Reason/ReScript seems mostly abandoned by Facebook at this point. Elm is very deliberately a one-man show (I don't like that bus factor). Ocaml compatibility and tooling seem easy then drop off a cliff in practice. Haskell is way too worried about math and the illusion of purity (and finding people willing to deal with it is very hard). Swift is Apple-only and doesn't actually bring much to the table (honestly, it seems like a rip-off of Dart with tuples and ref counting instead of a GC). Rust is much lower level and writing something in rust will take far longer than in JS.


JavaScript is 26 years old, people were calling COBOL old in the 90s, when it was 30+ years old.

COBOL is still being updated, it even supports OOP now, yet it shows its age and its joints creak a little, just like JavaScript.


It has become from terrible to less terrible.


Here is the thing, just use script tags without any kind of npm, webpack or whatever is trendy, pure vanilaJS, it is a wonderful experience.

And hey, it might even become hipster trendy eventually.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: