this post was submitted on 30 Oct 2023
989 points (96.0% liked)

Programmer Humor

32018 readers
1011 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] pixxelkick@lemmy.world 65 points 10 months ago (9 children)

It's hard to justify using anything other than JS or if you wanna be fancy, Web Assbly, for the FE.

Any other front end language involves generating Javascript from your language, which inevitably ends up with you making a weird Frankenstein project that mixes the two.

I'd rather just use stuff like Webpack or Vite to compile my JS front-end out of JS (or TS) from the start. It always ends up being a cleaner result.

My backend though can be whatever the fuck I want it to be.

But if you ever think dynamically compiling/transpiling a JS front end on the fly on demand is a good idea, instead of simply just delivering static pre-compiled/transpiled pages, you're part of the problem for why the web is so slow and bloated.

It's wild how crazy of projects people will build that take 3 entire seconds to just deliver a 500kb static form that doesn't even need angular to do anything. They turn a couple hundred kb into several mb for no useful reason, it's wild.

[–] savedbythezsh@sh.itjust.works 6 points 10 months ago (1 children)

To my understanding, you can't really use WebAssembly for the frontend - it doesn't support manipulating the DOM, so you still need to offload a lot of the work to JS. It's an uncontested language when it comes to web frontend.

[–] r1veRRR@feddit.de 11 points 10 months ago

It does support it, it's just slower than JS. WA is faster in other aspects though, so frameworks that compile to WA (like the Rust framework Leptos) still end up being faster than a lot of JS ones.

load more comments (7 replies)