News for hackers. Stuff that matters.
Re:Rich Harris joins Vercel to work on Svelte full time by pier25 on Thursday November 11, 2021 @04:11PM (#29193220)
Objectively, the Svelte example is cleaner and easier to read.
Re:Rich Harris joins Vercel to work on Svelte full time by diegof79 on Thursday November 11, 2021 @05:19PM (#29193977)
The issue is not only the syntax, but the semantics. What happens to the scope when you nest #each expressions? Does it work with iterables (like for..of), or it behaves like for..in? I don't use Svelte, and I don't know those differences by reading the code. To me the nice thing about JSX is that is straight forward with JS semantics:

    const a = <div prop={expression()} />
is a DSL for:

   const a = factory('div', {prop: expression()}) 
is only a DSL to create tree structures (React is another story, you can use JSX without React).
Re:Rich Harris joins Vercel to work on Svelte full time by kosolam on Thursday November 11, 2021 @05:02PM (#29193759)
Subjectively, I’d say. But since I agree that it’s cleaner and easier to read- I upvote you
Re:Rich Harris joins Vercel to work on Svelte full time by spoils19 on Thursday November 11, 2021 @04:18PM (#29193307)
By what metric are you measuring it objectively?
Re:Rich Harris joins Vercel to work on Svelte full time by pineconewarrior on Thursday November 11, 2021 @05:12PM (#29193889)
density.
Re:Rich Harris joins Vercel to work on Svelte full time by epolanski on Thursday November 11, 2021 @05:34PM (#29194138)
Saying it is objective but not mentioning the reason really makes your statement subjective.