(no title)
stoned | 4 years ago
I've never understood why this is deemed such a big ask by so many people. You can either compile JS-to-JS or have your JS break when it encounters an old browser (which is exceedingly rare, these days, so you don't really need to compile JS-to-JS. Most of the "bullshit" [aka tooling] these days bundles and optimizes your JS).
Many languages have compilers that you need to run. Before running a Java program, you need to compile it. And compiling things with `javac` is hardly simple. You need to populate your classpath, configure all kinds of stuff. It's not trivial. So why is it such a big deal when you need to do the same thing when making a webapp?
To make meaningful, portable applications in JS, you need to use a compiler. That's both due to the varying runtimes your code will encounter, and due to the fact that your application consists of many files that benefit from being compiled together by tooling versus by you, by hand. Configuring such a compiler (webpack, parcel, rollup, etc) can be of varying levels of complexity. Next.js makes starting a webapp trivial. It's what create-react-app should be.
Yeah, if you want to just make an HTML, that's fine, you can just roll some JS and it'll probably work in most browsers. But if you're making an application, then it makes sense to start using some tooling. When has this not been the case in web development? Even before client-side apps really took off, getting your server-driven HTML-emitting application going was hardly simple.
MrDOS|4 years ago
It's the “Script” bit of “JavaScript”. Once your scripting language needs compiling, it's jumped the shark. You need to go back to the drawing board and invent something else. “I don't want to compile JavaScript” is the face of it, yes, but at its core, this sentiment rails against the entire bloated, over-developed, under-engineered state of contemporary JavaScript.
godDLL|4 years ago
gorgoiler|4 years ago
1/ no compilation step during development, but it breaks old browsers;
2/ continuous compilation while developing so that you support old browsers;
…but there ought to be a third option that would satisfy everyone:
3/ no compilation while developing, and one compile step at release time to support older browsers.
xena|4 years ago
unknown|4 years ago
[deleted]