Remix.run Logo
apsurd 18 hours ago

it's not about feigning html purity it's the opposite. Why pretend we're using HTML when it's not? so with react it becomes a js flavor, jsx, which some people hate but it's very clear that it's a made up language IN real javascript.

edit: the mental model is instant: it's just javascript for reals. do anything you want in javascript using real js primitives. it's not about looking pretty, jsx doesn't. it's about not relearning basic programming primitives in a made up _markup_ language.

my issue with angular is it's neither real html nor any programming language. its made up pseudo-programming language for no other reason than it fools people into thinking "it's just HTML". that's my gripe.

markmark 18 hours ago | parent | next [-]

Completely agree with you. Every time I see yet another template language adding some clumsy for-each loop syntax I sigh. Just let us use a normal programming language. As an example I give you every template system ever invented. Devops tooling is full of them.

recursive 2 hours ago | parent [-]

Over the years, I've seen a few posts like this that seem to take it as a given that a loop in a normal programming language is better than foreach capability in a template language. Certainly enough times to believe that a significant group of people actually believe it's superior.

There's not a difference in capability of expression of the two models. It seems to be a purely aesthetic or comfort difference.

I guess different people like different things.

apsurd 35 minutes ago | parent [-]

It's because native programming language will defacto allow you to hack it to its natural limit. A tendency most all programmers have given they even get into programming.

For example with any iterator/loop you may want to filter, or find, or transform. in ruby you have the entire Enumerable API to dig into or Array prototype for js.

a templating language would have to reimplement functionality one by one in an allow list.

it's just fatigue at that point, yet another API i've got to mentally track.

edit: of course if you export the view data "clean" before hand it compels you to not have intense logic in the view. I get that but after a decade+ in product, views are never pure, even just ability to highlight the active tab takes conditional and select logic in a loop.

recursive 2 hours ago | parent | prev | next [-]

JSX also fools people into thinking "it's HTML in javascript". I've heard several co-workers say this. JSX is a made up language as well. It's not javascript. That's why you need a build step to parse the syntax.

Angular and vue's template language are no more made up than JSX is.

harry_m 17 hours ago | parent | prev [-]

Both the Vue template language and JSX are supersets of HTML. However, when it comes to integrating with CSS, JSX significantly worsens DX.