11 ms·
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 successf
by akrymski 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.
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.