3 ms·
I think what we need is a new spec that compiles down to whatever HTML/CSS/JS/WASM is supported by browsers over time. Waiting for browser vendors to agree on
by akrymski 4y ago
I think what we need is a new spec that compiles down to whatever HTML/CSS/JS/WASM is supported by browsers over time. Waiting for browser vendors to agree on a new spec takes far too long.
The same thing happens in all of comp-sci: we create a new programming language that compiles to an old language (C to Assembly) because changing the old one takes longer than inventing a new one.
- dimmke 4y agoUltimately, that's what all these different frameworks actually are though. Look at how many different languages over the years have compiled down to JS? CoffeeScript, TypeScript, Elm. And all the frameworks that have smoothed over the native DOM API: React, Angular, JQuery, too many to list. They all implement these concepts in Javascript. But if we don't standardize and allow browser vendors to implement at a lower level, we will always be taking a speed hit and on the framework treadmill. We need to take what we know works and do it.
- akrymski 4y agoSort of, but React is not a language. It's a runtime lib. JSX is not really helpful - still writing HTML and CSS. TypeScript has been very useful and successful but it hasn't touched the UI stuff. We need a better alternative to HTML and CSS. With WASM any language can now be compiled to run in the browser, and it's a matter of time until WASM integrates with the DOM as well. This isn't web specific. Desktop UI APIs change frequently too. UI is hard, and only higher level of abstractions can simplify things.
- dimmke 4y ago>Sort of, but React is not a language. It's a runtime lib. JSX is not really helpful - still writing HTML and CSS. TypeScript has been very useful and successful but it hasn't touched the UI stuff. That's my point. The main thing that JSX does is address that you can't do conditional rendering or interpolation with HTML. It's the same with literally all of these other templating languages. Blade, Jade, Handlebars, Mustache, the list goes on and on. Typescript literally exists to address a deficiency in JS. I don't think reinventing the wheel is the answer - it should taking these clear improvements and adding them to the core product. A big part of why technologies become popular is because of how accessible they are to newer or less knowledgable developers. I don't think some new idea would work, we should work with what's already there. I don't think there's any fundamental flaw in HTML, CSS or JS that necessitates a complete replacement. Just adjustments. HTML's purpose is to semantically describe content. I don't see how that is at odds with describing the user interface for software vs. a web page. CSS can lay things out great. It used to be a pain, but flexbox/grids have made it easy now. JS is the most popular language in the world. If we added a "types" mode that just adds the typescript syntax and lets you set a flag for it, it'd be even better. We don't need a new programming language for people to learn. See, that's where we differ. I think HTML and CSS are great. They just need to be improved. >This isn't web specific. Desktop UI APIs change frequently too. UI is hard, and only higher level of abstractions can simplify things. Yeah, and if you look at the popularity of electron apps it's pretty clear that people prefer doing this stuff in HTML/CSS/JS, even with all the hacks than trying to learn platform specific stuff. I'm arguing with tweaks, we could do it AND have it be performant and not a pain in the ass.
- akrymski 4y agoHTML and CSS were not designed for building software. There's a reason it's nearly impossible to implement a web browser from scratch these days. The spec is an ancient monster. Adding more layout options to CSS doesn't simplify things, but only complicates. How many ways are there to layout stuff these days? Try explaining flexbox to a newbie. HTML was meant for hyperlinked documents. It may be ok for that, but it's inappropriate for apps. Who cares about semantic meanings of DOM nodes in an app? I don't think people prefer web dev to desktop dev, but really there's no choice if you need to support multiple OSes. Swift UI is a much more consistent development experience for example. Visual Basic was that for Windows. But cross platform? The only real target there is Skia.