2 ms·
> I don't think it's going to change, either. No one has structured HTML creation that's as easy as string templates. This... isn't true. JSX is structured HTM
by lucideer 3y ago
> I don't think it's going to change, either. No one has structured HTML creation that's as easy as string templates.
This... isn't true. JSX is structured HTML creation. Lisp too obviously but that's not as popular in modern web dev. JSX is surely the most popular HTML creation method in modern web dev?
> I don't have any particular answers to why string templating has been enduringly popular so far
I was disappointed to read to the end and see this, as the article title wording - "is telling us something" - seemed to hint that the central topic would be trying to pose answers to what that "something" is.
> (although I can come up with theories, including that string templating is naturally reusable to other contexts, such as plain text).
This is something I think JSX is really close on, but not quite there - it might be nice to see a fully HTML/XML-compatible syntax that works exactly like JSX does. I know JSX started out with that idea, and the incompatibilities introduced were well considered and made sense, but I'd still be curious to try.
Overall, while I think the author makes a good point (fighting user tendencies head on is mostly futile) the benefits of structural generation are clear, while strings have no real benefits beyond UX/DX - acknowledging that the fight is futile is ok but I think it's still worthwhile to continue the fight in a more compromising/self-aware/middleground type approach. JSX fits this really well.
Would be nice to see the concept spread further outside of the React ecosystem, maybe even to other languages in some form.
- deleted 3y ago[deleted]