Live data from Hacker News

The JavaScript ecosystem is delightfully weird

fly.io

81–90 of 248 posts

Re: The JavaScript ecosystem is delightfully weird

#81

Earlier quoted context omitted.

WebStorm and VSCode both have OK debuggers, but in my experience they are even more finicky than the Chrome one, which as you noted does have issues. Firefox and Safari are likewise fine, but not as good as Chrome. More importantly though, if you are that distrustful of Chrome, you probably should not be using Node because it is based on v8, the Chrome Javascript runtime.

There are basic things to be desired with the current state of affairs, beyond the trust of Google, such as: 1) ability to debug locally, without an Internet connection. 2) ability to debug reliably, without fear of debugger features becoming 'updated' when one needs it most. The fact that no independent debugger, without the Leviathan that is Chrome, exists, only hides this aspect even more, hardly doing justice to…

Have you tried VS Code or WebStorm? They are both independent debuggers. They are quite good for debugging in my experience. I don't know that they offer profiling capabilities.

Re: The JavaScript ecosystem is delightfully weird

#82
> Less that 10 years ago, JavaScript sucked bad. It had no imports, no classes, no async, no arrow functions

No classes in JS was much better than with. As someone who used and contributed to CoffeeScript, I was initially excited by them but in retrospect, they've been a huge negative IMO.

Douglas Crockford saw it immediately: https://www.youtube.com/watch?v=PSGEjv3Tqo0&t=300s

Re: The JavaScript ecosystem is delightfully weird

#83
post #31

Earlier quoted context omitted.

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.

ECMAScript Language Specification 13th Edition / June 2022 (846 pages): https://www.ecma-international.org/wp-content/uploads/ECMA-2... Working Draft, Standard for Programming Language C++ from 2020-01-14 (1815 pages): https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/n48... I'm not sure what's the "correct" spec for the current C++ standard is. Still a big difference between these languages, but 846 pages isn…

Random committee draft of the C spec from 2007 (552 pages): https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf

Intel 64 and IA-32 Architectures Software Developer’s Manual, Volume 2 Instruction Set Reference (2552 pages!!!): https://cdrdv2-public.intel.com/774492/325383-sdm-vol-2abcd....

The ECMAScript language spec is closer to the C spec than the C++ spec, by a large margin. I'm not sure how much you can deduce about relative complexity from these figures.

Re: The JavaScript ecosystem is delightfully weird

#85
I started writing a small static site generator for myself using JavaScript and QuickJS by Fabrice Bellard[1]. QuickJS is not quite complete, and there are some cross-platform inconsistencies, but overall I found it pleasant to use and its libc wrappers to be powerful enough. I also found that JavaScript is actually pleasant to use when I'm not using classes, or dealing with metaprogramming/Babel, or implicit globals. Dependencies are just pure .js files I keep in a /lib directory and import.

I still think JS is a nice language although I tend to side with Crockford (before he started promoting the "next" language) in that JS has some good parts, and you can write clean and powerful software with it if you ignore most of its warts (even if you're using Node). My best advice is be very careful with what dependencies you choose; and also, don't feel pressured to be at the bleeding edge all the time. The Node/React world is a constant hype machine that flip-flops on best practices every 6 months. Be very skeptical of them, and don't let them spoil JS for you.

[1] https://bellard.org/quickjs/

Re: The JavaScript ecosystem is delightfully weird

#87
post #61
post #24

The JS ecosystem also relies on npm, which is owned by Microsoft. Having a corporation control package management is pretty weird .

Something something pnpm, yarn, jfrog

I believe they don't have registry or independent mirrors. Which CLI tool isn't that important.

Re: The JavaScript ecosystem is delightfully weird

#88
post #68
post #7

Coffeescript was well before "tree shaking" (the JS ecosystem's way of spelling "dead code removal") and code splitting, both being relatively new things in the bundler world ("tree shaking" being introduced with rollup if memory serves). Then came Acorn, which gave way to a whole slew of JS transformation bits. It also didn't help that Node was fixed at 0.12 for years and years, and we had the IO.js fork until Node…

> As a maintainer of several large JS packages, and being so dreadfully burnt out on JS, there are other words I'd use to describe the whole thing than "delightful". My first project that used JS was in 1996, so I've been along the ride every step of the way. Up until today where I am working with all of this on an Angular 15 enterprise project. I actually would describe it as delightful, compared to what it was like…

The thing about JS is that it was always terrible 5-10 years ago, and is always "actually good now".

[EDIT] Though I actually agree that it's nearly-tolerable now that we have TypeScript and async/await to force what always should have been the default behavior.

Re: The JavaScript ecosystem is delightfully weird

#89
post #76

I can't help but cringe when looking at the dependency count when using some javascript framework to write client-side code. I think the frameworks and the ecosystem is overly complex and the same could be accomplished by embracing minimalism. I do like things such as babel and webpack though, but those are dev-dependencies which is unrelated to the contents of the final bundle and I can live with few dev dependencie…

Wish we had something simple like jQuery

Re: The JavaScript ecosystem is delightfully weird

#90
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 think this is pretty much all of programming.

Or life in general.

There’s plenty good and plenty bad. It’s no use fixating on things you can’t change. Focus on what you can do.

Post reply on HN