Live data from Hacker News

Get in zoomer, we're saving React

acko.net

51–60 of 251 posts

Re: Get in zoomer, we're saving React

#52

>A templating language is mainly an inner platform effect. It targets a weird imagined archetype of someone who isn't allergic to code, but somehow isn't smart enough to work in a genuine programming language. In Strange sentiment. Isn't React templating as well? Besides one of the most famous use of templates is macros (in C as well as other languages). Would people who generate code be allergic to coding?

> Isn't React templating as well? Nope! You can make React apps with just a plain ol' JS file (and doing so is frankly instructive). Most folk add in JSX for extra syntactic sugar tho, so the confusion with templating is understandable.

You can, but who does?

Re: Get in zoomer, we're saving React

#53
post #41
post #26

Earlier quoted context omitted.

I always thought the point of the template language was more to enforce the boundary of presentation and code. and thus any template language that grows too powerful is a bad template language, because it's no longer doing the one job it has. So I think a template language should have loops, (non mutable) variables and basic conditions, that's it. So if there's something you can't do in your template that you want to…

If a template needs loops or even conditionals, it is already too complex for my taste as it leads to wrong design patterns blurring presentation/code boundary. Something that just allows to access variables and call functions will keep the boundary while allowing a non-programmer or even the end-user to edit it.

Logic-less template is ok despite some having loop because semantically, users also want to list things, add a thing to a list. I wouldn't add `if/else` but switch-case (this simulates category in user space, not complex condition). "Local variable" shouldn't be exposed to users. Collection name is ok. I think Shopify's Liquid is good, they just can't figure out decent UX on top of it.

Re: Get in zoomer, we're saving React

#54

Earlier quoted context omitted.

As soon as I saw, "you should listen to your elders" being used as a reason to read this article, i knew it wouldn't be high quality

That's a pretty inexperienced take, out of context. People should absolutely learn from elders, even if they feel the elders are wrong. Which is pretty much, every young person who has ever existed. There are often nuggets of wisdom buried inside resistance to change. I often wonder how much further along we'd be as a society if we didn't spend the first couple decades thinking we know everything. Myself included.

"Wisdom" of elders should stand on its own by being well reasoned.

If someone needs to say "listen to your elders" then they aren't able to articulate their argument well enough to stand without it.

(I've been programming much longer than the 32 years claimed by the article author. No one should listen to me because I'm old, except in the case where I'm talking about specific incidents I witnessed that younger people didn't.)

Re: Get in zoomer, we're saving React

#56

> Crucially, none of the React alternatives solve this FFS. The context is the web, nobody solves graphic problem like gaming for you, or need to. At this point it doesn't matter because HTML/DOM stuff is not going to suffice what you are talking about either. I honestly think after reading 50% of the article is all about bragging knowing history. I'm not old but I was there too. WIN32, MFC, QT, 8086 assembly whateve…

Yeah, I stopped halfway through the article. Don’t talk down and condescend to your audience for no reason I think the article should be rewritten and all the ranting removed It’s also difficult to follow where the author‘s going with all the side rants and unrelated remarks And yes, that is considered ranting, contrary to what the author claims in the beginning of the article

I do agree with you, but to play devil's advocate: This article is currently #9 trending on the front page. I've meanwhile seen similar critiques of React written in a different style, and seen them not get a vote or comment. Perhaps those rants do serve a purpose?

Re: Get in zoomer, we're saving React

#57
post #52

Earlier quoted context omitted.

> Isn't React templating as well? Nope! You can make React apps with just a plain ol' JS file (and doing so is frankly instructive). Most folk add in JSX for extra syntactic sugar tho, so the confusion with templating is understandable.

You can, but who does?

Yeah strangely it compiles to functions but they way they compose is not the way we compose function. Practically it's a template, compose via component mechanism. If it's a language it should be like Elm where attributes and children are also List and have return type, can be programed in function style.

Re: Get in zoomer, we're saving React

#58
post #52

Earlier quoted context omitted.

> Isn't React templating as well? Nope! You can make React apps with just a plain ol' JS file (and doing so is frankly instructive). Most folk add in JSX for extra syntactic sugar tho, so the confusion with templating is understandable.

You can, but who does?

I think the point is that React is a true programming language with syntactic sugar to make it look templates, vs templates that bolt on some language.

Re: Get in zoomer, we're saving React

#59

This post ultimately seems to spend a long time complaining about other people not putting in the effort to fix the problems of React... while the author doesn't offer any solutions or even ideas for solutions. Also, the author makes repeated digs at React 18's concurrent mode work while at the same time complaining about the kind of stuff concurrent mode is supposed to fix (for example, React updates not happening f…

As soon as I saw, "you should listen to your elders" being used as a reason to read this article, i knew it wouldn't be high quality

So unnecessary too. Having experience in the domain, like teaching react, lends more creditability than "trust me, I am old".

Re: Get in zoomer, we're saving React

#60
post #41
post #26

Earlier quoted context omitted.

I always thought the point of the template language was more to enforce the boundary of presentation and code. and thus any template language that grows too powerful is a bad template language, because it's no longer doing the one job it has. So I think a template language should have loops, (non mutable) variables and basic conditions, that's it. So if there's something you can't do in your template that you want to…

If a template needs loops or even conditionals, it is already too complex for my taste as it leads to wrong design patterns blurring presentation/code boundary. Something that just allows to access variables and call functions will keep the boundary while allowing a non-programmer or even the end-user to edit it.

disagree, because the alternative is having a million tiny templates, which is annoying and cumbersome. sometimes you just want a condition to check if a user has an avatar, or if there are replies to a post, or whatever else. same with loop, if something is specific to a template, there's no reason for repeating content to not be a loop (I don't think a template system should allow custom loops though, only looping over predefined content).

I prefer having one big template for a view, when doing SSR. Some layout components will have to be their own template if they repeat on different pages, depending on the template engine you can either pull other templates in directly (in which case using loops is also valid here IMO), or have a variable with a HTML blob generated from another template.

I don't really think either of those things count as code, because there's only logic that is relevant to how things are displayed. It's just, if the user has an avatar, show an image tag, otherwise, show a placeholder image/nothing. repeat this HTML once for each comment shown. That's not code in any meaningful way. I mean technically all of it is code, but you know what I mean.

Post reply on HN