3 ms·
Objectively, the Svelte example is cleaner and easier to read.
by pier25 5y ago
Objectively, the Svelte example is cleaner and easier to read.
- spoils19 5y agoBy what metric are you measuring it objectively?
- pineconewarrior 5y agodensity.
- kosolam 5y agoSubjectively, I’d say. But since I agree that it’s cleaner and easier to read- I upvote you
- diegof79 5y agoThe 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).
- epolanski 5y agoSaying it is objective but not mentioning the reason really makes your statement subjective.