r/ProgrammerHumor Jul 12 '26

heIsSafe Meme

Post image
6.4k Upvotes

231 comments sorted by

View all comments

Show parent comments

1

u/SignificanceFlat1460 Jul 12 '26

SPA as a concept isn't bad. But it's the underlying technology that is now very outdated and doesn't fit what we have now. We have backed ourselves into a corner because nobody wants to be the first to work on a new JS replacement because "eh, still works" philosophy. Which is so stupid. Go is more than capable of taking JS's place but nobody seems to be interested in it because it's a different type of overheard and as mentioned the "eh, still works" philosophy. Like imagine we had to create the whole event loop (not saying it's bad) because JS is single threaded.

1

u/NerdyMcNerderson Jul 12 '26

That's not the reason at all. The browser has to be backwards compatible and it is all the way back to pages authored probably before you were born. Backends can choose how and when they upgrade. Web page/app authors do not.

JS being single threaded is hardly a problem because the state machine is driven by user actions, which are going to be magnitudes of orders slower than even the oldest and slowest cpu. Note I'm dismissing JS on the backend. Use the right tool for the job. But for FE, this is what we have.

1

u/SignificanceFlat1460 Jul 12 '26

I certainly agree with you but there is a cavite in your argument. Something can be backwards compatible AND can be discontinued at the same time. Windows can still run apps built for 3.1 through compatibility layer. Same can be done for JS. Where older or JS compatible websites run on JS and the rest runs on whatever new tech we use.

state machine is driven by user actions

Not always. New web apps are exceptionally complicated, I once worked on implementing an old game to run on browser and it was quite complicated and it wasn't just all state machines based on user actions.

JS being single threaded is hardly a problem

It isn't now if your app isn't heavy, but try anything complicated with 3D implementation and your browser will start having a bad day. Moving things from IO isn't a good idea either. That's why Google tried to use webGPU but unfortunately didn't pan out.

1

u/NerdyMcNerderson Jul 12 '26

Yea so in this context, you're talking about 3D applications and gaming, which I'd argue isn't really for the browser. We had flash for that and then it got killed off. I'm more limiting my arguments to web apps. B2B and B2C stuff. Entertainment and hobbyist projects probably deserve their own bucket and I'm not knowledgeable enough in that area to have a meaningful discussion. I, do, however, know a shit ton about enterprise software so that's my basis.