Hacker News new | past | comments | ask | show | jobs | submit login

Objectively, the Svelte example is cleaner and easier to read.



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).


Subjectively, I’d say. But since I agree that it’s cleaner and easier to read- I upvote you


By what metric are you measuring it objectively?


density.


Saying it is objective but not mentioning the reason really makes your statement subjective.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: