Live data from Hacker News

The JavaScript ecosystem is delightfully weird

fly.io

31–40 of 248 posts

Re: The JavaScript ecosystem is delightfully weird

#31
post #6

Javascript is this generation's C++. It's a massive language and the only way to stay sane on a project is to agree to use a well demarcated subset of it. Nothing wrong with being C++. The reason JS is so massive and weird is because it's the language that everybody uses, or has to use at some point. Upsides and downsides.

Are you talking about JS the language, or the ecosystem?

JS as a language isn't nearly as big as C++ or, say, Swift... I'd say Python complexity is on par or even higher than JS, in terms of core language features.

There are some language features that are outdated but it's hardly like the C++ situation.

Re: The JavaScript ecosystem is delightfully weird

#32

So JS is delightful because we are still not actually writing JS, but stuff that looks like JS? Huh.

That is not what the author said. They said the JS Ecosystem was delightful. He then goes on to describe that Ecosystem. For some people that ecosystem is indeed delightful. They love the sheer complexity it takes to deploy a JS application these days. There is certainly a lot of choice and power out there for it.

I personally am the kind of person who tries to ship my stuff as a single statically linked binary that I can just drop in place so I look as WebAssembly as a way to participate in the browser ecosystem while avoiding the whole NPM/JS Tower of development tooling complexity. I don't begrudge others from wanting to play there though.

Re: The JavaScript ecosystem is delightfully weird

#33
post #12

I wonder how much of this can be blamed on JS being a relatively gentle and forgiving codegen target.

How is it a better codegen target than any other language? That's not intended with an argumentative tone- I'm genuinely curious as to what you mean.

Javascript benefits from the major efforts put into its JITs. No other scripting language really has that.

Re: The JavaScript ecosystem is delightfully weird

#35
post #14

> Nobody Writes JavaScript Any More This is how "delightful" it is, and is the reason I'm waiting for it to die. Every couple of years we decide on the 'no no, definitely this time we have it all figured out, trust us, just use X' "solution" to the problem of JavaScript. We have the definative 'this is how you do it', until the next one.

I don't know enough about WASM to know why it can't be exposed directly to the DOM, since in theory the DOM should be a language-agnostic interface. If that were to happen, I think the floodgates would really open on WASM and we'd finally start to see JS die.

Re: The JavaScript ecosystem is delightfully weird

#36
post #26

I am a product of a coding bootcamp from awhile back, so JavaScript is really the only thing I’ve ever known in my career (outside of writing some apps in Visual Basic around 2001). Maybe it’s because it’s the only thing I’ve ever known, but… I like it? I guess if I hack around on a side project and want to use vanilla JS, it’s the Wild West and there’s no rhyme or reason for anything (and everything looks gross). Bu…

JS itself is perfectly fine and quite a nice language when you stick to all its modern idioms that you learned and use today. I think what rankles a lot of people is going through the history of JS when it was terrible and confusing, then basically just jQuery, then the explosion and confusion of server side/node and drama with the company behind it, and finally confusion and drama with moving to modern ES modules.

For the longest time doing the most simple thing in any programming language, putting code in a separate file and loading it to execute, was nearly impossible in JS and required learning and picking sides in an opinionated loader battle. It was confusing and pretty bad for newcomers.

Nowadays all that drama is settled and the core of modern JS is quite nice. I like it more than python to be honest.

Re: The JavaScript ecosystem is delightfully weird

#37

Earlier quoted context omitted.

What else was there, besides VBscript, or whatever Microsoft was calling it then? Even if we're only talking hypotheticals, at what point would anyone have attempted to release an alternative? Everything was mucked up well into the 2010s with everyone chasing IE compatibility. And not even 3 years later, Chrome had taken over the world. That's a really brief window for anything to happen.

What else was there? Plenty of stuff! It could have been a lisp, it could have been a flavor of pascal, python was around even if it wasn't popular yet. Thank heavens we didn't end up with a flavor of BASIC, although as you point out it could have happened.

js is pretty lispy. Crockford is pretty compelling that the reason js survived (and beat Java which was the heir apparent) is because of the attributes it inherited from Scheme.

Re: The JavaScript ecosystem is delightfully weird

#39

Earlier quoted context omitted.

I suspect that if some accidents of history hadn't left JS as the only language you can use to script a Web browser, it would have died off long ago.

What else was there, besides VBscript, or whatever Microsoft was calling it then? Even if we're only talking hypotheticals, at what point would anyone have attempted to release an alternative? Everything was mucked up well into the 2010s with everyone chasing IE compatibility. And not even 3 years later, Chrome had taken over the world. That's a really brief window for anything to happen.

The idea at the turn of the century is that Java Applets would be the way web applications would be developed. That was a disaster for security, ux, etc.

Re: The JavaScript ecosystem is delightfully weird

#40

I wonder how much of this can be blamed on JS being a relatively gentle and forgiving codegen target.

I think what makes it a popular codegen target has more to do with

- The places it can run

- The ecosystem it can interop with

Not that it's a bad codegen target otherwise- it's high-level but performant for being so high-level, it's garbage collected, first-class functions, low-level primitives are available for optimizations, etc. But these on their own don't make it super unique

Post reply on HN