3 ms·
Things aren't normal because JavaScript in the browser is, technically, a very strange starting point for a computer revolution. It is quite different than the
by javajosh 4y ago
Things aren't normal because JavaScript in the browser is, technically, a very strange starting point for a computer revolution. It is quite different than the Unix REPL approach that preceded it. Much of the craziness is around shoe-horning javascript into the gcc paradigm (webpack) or shoe-horning gcc into javascript (webasm).
The question I'd like to explore, is what if you just author web pages in html, css, and javascript? I feel like web standards are very good, browsers are incredibly powerful, to the point it may be safe to attempt this approach.
Writing pages for modern browsers, with no polyfills, no transpilers, is quite pleasant. Writing JavaScript with arrow functions and destructuring and jquery-esque selector methods, and consistent event apis, is very pleasant. The module system is fine (I'm warming up to it). But how many professional front-end or full-stack folks would even know?
- harrisi 4y agoI've messed around a little with this because I like the idea of zero-dependency websites. I think the biggest issue I have is how web components work. I really hate that JavaScript is required. At least with SSR you can have nice, scoped components that don't need JavaScript. I know it's more and more niche but if my project doesn't need JavaScript for functionality and only uses it to enhance some experiences when available, I simply cannot use standard web components without using some other tool to deal with SSR, but at that point why bother with writing standard web components if some framework has some other nice additions?
- javajosh 4y ago>hate that JavaScript is required JS hatred is a huge problem. It has driven huge projects since XHR was invented. Google's GWT was one of the first, targeted at Java devs. jQuery was a bit js hatey, too (early devs didn't know where js stopped and jquery began, including me). And js hatred continues to drive countless projects promising devs 'you don't have to learn js'. I believe this attitude is utterly foolish. To build a webapp without knowing the foundations of the web is foolish. And much of the misery devs experience is because they weren't willing to do the harder, but wiser, thing and just suck it up, and learn how to program browsers. Literally every dev who's ever believed the line about not needing to know html, css, or js has discovered how utterly false this is. (TypeScript is actually an exception here since it's a strict superset of JavaScript, so if you are a TS expert you are already a JS expert)