Top
Best
New

Posted by onlyspaceghost 12 hours ago

The three pillars of JavaScript bloat(43081j.com)
370 points | 211 commentspage 2
burntoutgray 11 hours ago|
I have a single pillar, admittedly for in-house PWAs: Upgrade to the current version of Chrome then if your problem persists, we'll look into it.
yurishimo 5 hours ago||
This is how it should be for internal stuff! Corporate IT wants everyone to update anyway so there really isn’t a downside.

One thing I kinda understand is users who want to use a more performant browser (safari really does sip memory I’ve found compared to chrome) but that’s kind of a side point. But if your company decides this is the browser(s) we support, then it makes sense and is the right way to go about it.

GianFabien 8 hours ago|||
Keeping it simple usually saves the day.
SachitRafa 10 hours ago||
The cross-realm argument for packages like is-string is the one I find hardest to dismiss, but even there the math doesn't add up. The number of projects actually passing values across realms is tiny, and those projects should be the ones pulling in cross-realm-safe utilities, not every downstream consumer of every package that ever considered it. The deeper problem with Pillar 2 is that atomic packages made sense as a philosophical argument but broke down the moment npm made it trivially easy to publish. The incentive was "publish everything, let consumers pick what they need" but the reality is consumers never audit their trees,they just install and forget. So the cost that was supposed to be opt-in became opt-out by default. The ponyfill problem feels most tractable to me. A simple automated check "does every LTS version of Node support this natively?" could catch most of these. The e18e CLI is a good start but it still requires someone to run it intentionally. I wonder if something like a Renovate-style bot that opens PRs to remove outdated ponyfills would move the needle faster than waiting for maintainers to notice.
est 10 hours ago||
More like a nodejs bloat rather than JS bloat.

For personal objects I always prompt the AI to write JS directly, never introduce nodejs stack unless absolutely have to.

Turns out you don't always need Nodejs/Reactto make a functional SPA.

kennywinker 9 hours ago|
You’ve traded supply chain vulnerability for slop vulnerability.
yurishimo 5 hours ago||
Except your supply chain could also be slop and you have no idea (unless you’re auditing your dependencies, right?).

I’d take vibe coded vanilla js slop over npm dependency hell every day of the week.

procaryote 7 hours ago||
The most frustrating thing with the "Atomic architecture" bit with tiny packages is how obviously stupid it is. Any borderline sane person should look at isOdd/isEven and see that it's an awful idea

Instead they've elevated it to a cultural pillar and think they've come up with a great innovation. It's like talking to antivaxers

RadiozRadioz 6 hours ago||
It's because it has a smart-sounding name. Some people are shallow and performative; some nice-looking blog post says they can have "atomic architecture", then the trend starts and everybody wants to show how enlightened they are.
whstl 2 hours ago|||
It's not just the name or the smart explanation.

Atomic packages brings more money to the creators.

If you have two useful packages it's hard to ask for money, even if they're used by Babel or some popular React dependency.

If you have 900 packages that are transitive dependencies the same couple deps above, it's way easier to get sponsorship. This is a way to advertise themselves: "I maintain 1000 packages".

The first guy that did this in a not-nice way was a marketing/salesperson and has mentioned that they did on purpose to launch their dev career.

TLDR: This is just some weird ass pyramid thing to get Github sponsors or clout.

williamcotton 5 hours ago|||
That’s not how we started down this path. See snark-free sibling comment from padjo.
RadiozRadioz 4 hours ago|||
Both my claim and theirs are unsupported by evidence, therefore they are equally valid.
padjo 4 hours ago||
A third argument is that it was because of aliens from the planet Blotrox Prime. But I suppose without evidence we'll just have to accept that all three theories are equally probable.
RadiozRadioz 3 hours ago||
Interesting how you decided to switch to hyperbole instead of providing evidence for your claim. Backing up your viewpoint would have easily shut me down, putting the ball in my court to do the same. Instead you gave a knee-jerk childish response.
padjo 3 hours ago||
Interesting that rather than try to bolster your claim you resorted to a logical fallacy to justify it.
RadiozRadioz 2 hours ago||
Hypocritical; you did the same with the hyperbole. Why are you stooping to my level instead of being the better person?
padjo 2 hours ago||
Nope. Just a reductio as absurdum that you decided to counter by asking that I maintain higher standards of debate than you.

The notion that atomic architecture came about because people are stupid and performative is not really useful. Its fairly misanthropic and begs the question why it became so prevalent in JS specifically.

padjo 5 hours ago|||
The philosophy was kinda refreshing in the early days. There was a really low barrier to publishing and people were encouraged to build and share tools rather than hoard things. It was probably somewhat responsible for the success of npm and the node ecosystem, especially given the paltry standard lib.

Of course, like most things, when taken to an extreme it becomes absurd and you end up with isOdd.

egeozcan 5 hours ago||
I think the issue is that the JavaScript ecosystem is so large that even the strangest extremes manage to survive. Even if they resonate with just 0.1% of developers, that’s still a lot of developers.

The added problem with the atomic approach is that it makes it very easy for these fringes to spread throughout the ecosystem. Mostly through carelessness, and transitive dependencies.

IsTom 6 hours ago|||
I've seen some juniors writing risoni code like that. They've heard that you shouldn't write big functions, so obviously they forcefully split things until they can't be split anymore.
groundzeros2015 43 minutes ago||
> It's like talking to antivaxers

This is not helpful.

il-b 10 hours ago||
The elephants in the room are react and webpack.
wiseowise 5 hours ago||
> Using the e18e CLI to detect replaceable dependencies

https://github.com/e18e/cli

That’s awesome. Could be hooked as a pre-commit for agents to do the grunt work of migration.

algolint 4 hours ago||
It's interesting how we've reached a point where 'vanilla' is seen as an obscure domain of knowledge. The 'gravity' of frameworks like React is so strong that for many new developers, the framework IS the web. Breaking out of that mindset often reveals that the browser has actually evolved quite a bit and can handle a lot of what we used to reach for libraries for, especially with Web Components and CSS Grid/Flexbox being so mature now.
whstl 2 hours ago|
I like to criticize React as much as the next person, but this is an JS ecosystem problem around third-party libraries, not a React problem per se.

If you're using third-party NPM packages to do "Vanilla", you're will probably run into the same problem.

If you import React directly from a CDN, you won't.

lerp-io 6 hours ago||
just make react native to browser and everything else thats a one off can be ai generated
sylware 2 hours ago||
It is not javascript itself (until the interpreter is written in plain and simple C or similar), it is the abomination of the web engine, one of the 2.5 from the whatng cartel.
skrtskrt 9 hours ago|
the fact that you can just redefine Map in a script is mind boggling
xigoi 4 hours ago|
Why? Being able to redefine anything is table stakes in dynamic languages.
fragmede 1 hour ago|||
You can't assign a value to false, for example, so "anything" isn't everything (Node v22.17.0).

    > false = 4
    false = 4
    ^^^^^
    
    Uncaught SyntaxError: Invalid left-hand side in assignment
Fascinatingly enough though, you can assign a value to NaN. It doesn't stick tho.

    > NaN
    NaN
    > NaN = 42
    42
    > NaN
    NaN
    >
(map behaves as described.)
g947o 2 hours ago|||
So? Does being able to do something means you should?
xigoi 49 minutes ago||
I didn’t say you should. The comment I’m replying to expressed surprise that redefining something is even possible.
More comments...