Imagine not using typescript. The python community gaslighting the js community. Imagine a big project website, and all in plain js, + multiple devs. Thats is going to be a mess. Never going back from TS.
About the third point, the performance of your JavaScript code can be worse if it's broken down into several small files rather than a single, bundled file. When a browser encounters a script tag linking to an external JavaScript file, it makes an HTTP request to fetch that file. This process occurs for each separate file. Each HTTP request involves time for network latency, server processing, and data transfer.
I'm usually preferring typescript too, but this point got me curious. I'm guessing it wasn't an honest point, almost everywhere I look people are still using a build step, and I didn't notice any move in a different direction
Http/1.0 would require serial connections, and the "multiple files bad" absolutely applies. Bundling and minification into a single JS file was common, even required - and I would consider that a build step. Otherwise you are dealing with all your code in a single massive file.
On http/1.1 browsers would open 6-8 concurrent connections to fetch files simultaneously. At this point, code splitting had benefits.
Most webservers now run http/2 which can fetch multiple files at the same time over the same connection. I believe it is "virtually unlimited" and the initial connection setup - which is often the largest performance hit - only happens once. At which point code splitting has such little impact on the transport layer, that it is more perfomant than transferring and loading all the code.
https://blog.vespa.ai/http2/
Has an more details as well as some load testing against http/1.0, http/1.1 and http/2
There is also a limit to the number of files the browser can download in parallel, so if many files have to be fetched, they have to wait until the previous downloads are finished. This slows down performance even more
The python community gaslighting the js community.
As a Python developer, I am absolutely giving ya'all a hard time for your gross bolted-on JavaScript type solution. /s
I do this primarily because I find it cathartic while I work with our gross bolted-on Python
type solution. /s (mostly sarcasm, some truth here)
I do this secondarily because I'm jealous that Typescript seems to be a good bit more mature than MyPy. (No sarcasm here. I really am jealous on this point.)
I recommend Pyright over Mypy if you don't mind it being owned by Microsoft. It has far fewer bugs, and if you do stumble on one, you don't have to fix it yourself because Microsoft's paid devs will fix it in a couple of working days (at least for the small bugs I've reported).
If you want type safety and no build step you do like svelte did and use jsdoc instead. You can run the typescript type checker on those annotations so if you care about not having a build step you can still have type safety.
Why though? I think I am missing the point, but I don't see the problem with having a build step in your projects. Especially for frontend it is not just JavaScript, but things like Sass/SCSS to consider etc.
When there's no build step, all the time is spent coding. None of it is spent configuring or setting up.
The hardest part of any software class in my experience is the triple combo of:
installation
"well it works on my machine" and
"well this code worked for last semester's class"
When I have students start off editing one html file using pinned URL imports, the reliability is just insane. People might claim "installing typescript is reliable" but doesn't even come close to the reliability of not having a build step at all. No build step Just Works™, no M1 Mac edgecases, no npm audit, no rm rf node_modules.
You always have linter steps, testing etc and a competent developer should be able to deal with all that. Of course you don't start with all this with new students, but I don't think that is what this post is about.
I switched from sass to tailwind a couple month ago and fucking love it. Highly recommend to give it try. Still requires a build step to trim out unused utility classes.
Probably the more important question is whether DHH is your boss.
It’s fine to look for people with real experience/opinions on the internet, but at the end of the day, you have to build your own product.
I also am going to just say that I’m betting the kinds of stuff rails does in JS doesn’t really need a lot of complex JS. My guess is a lot of it paints on behavior similarly to what htmx does now, which doesn’t really require a ton of js code anymore. I don’t much see the point removing TS for the vast majority of projects.
I'm asking mostly out of curiosity, but I had a use case that I would like to completely avoid a build step. At work we have a very old web interface, that when I attempt to sell the idea of any major improvement the answer is "this is end of life, we are rewriting it". But the rewrite will take a long time, and it is easier to make gradual improvements without introducing new tooling. This one is from the 90s, there the JS is in a folder and is shipped as is.
It's doable and although I would best describe the dev experience as "ok", it is improving over time.
Per your bullets
use newer module based js libraries, yes this is limiting but getting better support over time, and you still have to deal with issues cause by different library types when using a bundler
JSX will require a build step at some point, pushing that to runtime doesn't improve anything. Instead I would favor lit html
probably true, but I would start without and wrap a bundler around the project when it becomes necessary, smaller projects will have a negligible effect. You should benchmark the differences yourself, and if you use es modules everywhere wrapping a bundler around it will be easy.
With the above you can get all the usual niceties too: hot reloading, lazy loading, etc
I don't do front end work so I don't know how all the terms are used. If by build step you mean any sort of CI process then I would say no, I think automated tests are important and should be ran before pushing.
If you just mean some sort of transformation, transpilation, bundling, etc. then I don't know enough to answer. My gut feeling is that the question is framed incorrectly. Many of these things were made as workarounds for various problems (or to make things easier). If you don't have those problems then you don't need those solutions. It doesn't have anything to do with progress (as in what year it is). Originally JavaScript was just plain old JavaScript. If it worked then it can work now. If you need the solutions people have made to get around limitations and short comings and vanilla JavaScript can't do it then you'll still need those solutions.
That's a great point. In any sort of enterprise system, you should be unit-testing your front end when you commit, and you should be UI-testing your front end before you deploy. If you're in a CI/CD pipeline, that normally happens right after the build step. If you need to have the pipeline running anyways, you might as well build.
WASM’s biggest holdback is that it cannot directly access the DOM. Until then, JS will still have a prominent place in building anything rendered in a browser.
That's actually a myth and real world performance isn't affected by this. See this video from leptos creator which is one of the more popular wasm ui framework https://youtu.be/4KtotxNAwME?si=D_vWV1LPQI-C9j8G
The biggest issue is actually the size of the payload since you need to ship the entire app and language runtime.