Ask HN: What if JavaScript isn't the solution to everything

35 points by londondev45 ↗ HN
It's starting to feel like the JavaScript 'ecosystem' is broken. Especially npm and the proliferation of small libraries written by inexperienced developers. When is the industry going to move on? Angular is a behemoth.

If the idea is to simplify with modules, I think they miss the point. The 'old' server side libraries, flask, ror, even .net MVC look elegant and simple in comparison.

When will this stupidity end?

39 comments

[ 2.2 ms ] story [ 31.4 ms ] thread
Well, with Webassembly en route, there is a future where we can use whatever language we like if the can target WebAsm.

Currently​, there is only support for manual memory management but there are plans to expand with GC.

There is certainly a horizon for expansion. We are already seeing this with languages that compile to JS. Perhaps WebAsm will provide the substrate for better engineered languages and code.

What if it is?

JS isn't that bad, the ecosystem big enough to avoid the small libs written by n00bs and easy to acces s thanks to npm. Npm isn't perfect, but better than what most languages have.

Many people already know JS and it's pretty much the easiest language to get started with, you just need a browser and an editor.

Most people don't use the best solution for a problem because often nobody knows what this would be, so they use what they know and make things work.

English is certainly not the best language for the world, still most people speak it and make things work.

Any suggestion on which human language is better than English?
By certain measures, one might say 'German'.
Something I've found recently on projects is that the npmcompare site makes it much easier to pick the library that has all the traction. It becomes very stark when you're comparing the package with 350k weekly downloads with one which has been downloaded by the original author and his cousin.
(comment deleted)
If you stop thinking like a front-end web dev, and take a step back from the whole thing, the status quo is truly insane and embarrassing. A many-billion dollar, world changing industry has been exclusively constrained to one dynamically-typed, weird language cooked up by one guy in a hurry, over 20 years ago.

How can such a phenomenon even exist, without programmers falling over themselves to create a development ecosystem with compilers and multiple language paradigms? The best answer I can come up with is that the history of web development is rooted in a culture that cares only about product design, user experience, and making a million dollars fast. It took a long time for systems programmers to get interested enough to provide the perspective of, well, a systems programmer.

It could be argued that not rocking the boat, and just accepting JS as the standard unconditionally, helped the web succeed. I don't agree with that. I don't see how having a good execution environment in the browser in 2004 could possibly have hurt the web.

Because it would have only worked for half the users. HTML/CSS/JS support parity across the browsers is a relatively new thing. If IE had python support and Firefox supported Ruby, what would have all the websites been written in?

It's kind of a messy miracle that that didn't happen and we got to where we are today. Now, with established standards support WebAssembly might be the next step you're looking for.

I may be the minority but I don't consider it a burden to need more than one app for something. Even today people have installed a half dozen chat apps to keep up with friends on different networks. If half the sites require Firefox and half Chrome then that's still only two apps enabling dozens of web apps for daily use.
You're in the minority.
No, he's not. My mother runs Firefox, Chrome and IE. She uses each one for different sites because certain sites only work well on certain browsers.

PS: The idea that the web has parity is a joke. It doesn't.

What sites these days work better with Firefox?
She prefers to use firefox, but Gmail works better in Chrome and her bank's site works better in IE. You're correct in that nothing works better in firefox, but it's what she's used to.
Sites with SHA1 certs.
You actually think the majority of users either do, or want to, use multiple browsers to manage site incompatibilities? Have you not met any people before?
Among the sites I visit frequently are several that only work well in Opera, one or two that only work well in Firefox, and one that only works at all in Chrome.
I struggle to imagine how I would build a site that only works in Opera, even if I were trying to.
Load it up with whatever bloat causes every browser other than Opera to struggle at every moment with scrolling a page. Which is absolutely the case on my 4 year old laptop. For whatever reason, Opera handles this like a dream, while Firefox and Chrome cannot, though I frequently go back and try them again.
Load it up with whatever bloat causes every browser other than Opera to struggle at every moment with scrolling a page. Which is absolutely the case on my 4 year old laptop. For whatever reason, Opera handles this like a dream, while Firefox and Chrome cannot, though I frequently go back and try them again.

Opera and Chrome use the same rendering engine now. Why would Opera work better than Chrome?

The second question is what type of computer is it? I have an old Core 2 Duo 2.66Ghz laptop/4GB RAM (circa 2009) that I've repurposed as a Plex Server. After installing an ad blocker and getting rid of unnecessary services, I don't notice a real world difference between that and my usual laptop - a Core I7 2.66Ghz - except for the difference between an SSD and a 5400rpm hard drive.

Web browsing is just not that processor intensive - a four year old A6x iPad can browse the modern web well.

Cool, guy, I must be imagining the whole thing. Every day.
Not saying you are imagining it, but a four year old computer that isn't infested with crapware should be able to run most mainstream sites.
(comment deleted)
It wouldn't be half/half, because many websites would then abstain from using a scripting language at all. Maybe more something like 90% pure HTML/CSS, 5% Firefox, 5% Chrome?
> 90% pure HTML/CSS

Like in the good old days

If barely-passable, but mostly imaginary compatibility could be achieved on JS and CSS, then it could have been achieved with something like WebAssembly. That it wasn't is just history and incentives.
A many-billion dollar, world changing industry has been exclusively constrained to one dynamically-typed, weird language cooked up by one guy in a hurry, over 20 years ago.

I'm definitely not a lover of JavaScript as a language, but it helps when you start thinking about JS as a "assembly language for the web". Very few people get worked up about whether x86 assembly language is a bad language we've for the most part moved on to a higher level of abstraction.

The same could be true for JavaScript. When I have to use JavaScript without TypeScript especially with a codebase that I'm not familiar with, it's like walking on a tightrope not knowing what you might break. You're always afraid of doing refactorimgs that would be a CTRL-K away with Resharper.

Kudos to Emscripten and the like for doing the best possible thing here, but if you STOP thinking like a front-end web dev, then low-level code is designed to be low-level code.
I'd probably have to re-evaluate all of my life choices. This question is just too hard to consider.
The javascript ecosystem is feeling better than ever to me right now.

The only reason that people are getting "javascript fatigue" and complaining that JS is being used for everything is because so many people are working so hard to improve and innovate the language/ecosystem... and so many people are actually finding applicable benefit to that work.

I've built several native iOS apps in Ruby with RubyMotion - no one was upset about Ruby fatigue or that Ruby is being used in a new context... Because why would they? There's nothing to complain about! It's just a product created by people working hard to provide value in a new way.

And that's what people are doing in the JS world too. There's just way more of them and way more people using and applying that work, so it starts to feel overwhelming. But that is not the fault of the language or the community.

No one is forcing anyone to use any language or framework. No one is forcing anyone to use any particular software. Pick the ones best for your needs — why pull down all the people working so hard on JS along the way?

The job market right now is pretty heavily skewed towards the whole JS stack, so your last comment is almost like "nobody's got to use the internet".
(comment deleted)
No language or technology is the solution to everything. In fact, they all suck in one form or another. Your job is to pick those that fit the problem at hand well. That's why learning multiple languages, and designs. You are the one size fits most solution. Study and learn and the feeling of everything being stupid should be reduced (never gone but thats good).
You can avoid the marginal libraries written by inexperienced developers, you know.
(comment deleted)
(comment deleted)
Madness never ends. You can be sane and stick to few well engineered libraries and ignore the hype.
Javascript is always dramatically overused at the top of every market cycle: DHTML in 1999, Web 2.0 in 2008, Angular/React/etc now. This too shall pass. And then reappear, worse.

If you are truly sick of javascript, I have something for you:

http://intercoolerjs.org

Why this was flagged?
OP thinks pretends like Angular is the only JS library, obviously did zero research (expressjs is like flask), then baits further with "When will this stupidity end?"