News for hackers. Stuff that matters.
Re:The Truth about Svelte by doctor_eval on Tuesday July 11, 2023 @11:51PM (#36690281)
How would you do it?
Re:The Truth about Svelte by willmartian on Wednesday July 12, 2023 @12:22AM (#36690450)
I much prefer keeping everything XML-ish:

https://www.solidjs.com/docs/latest/api#switchmatch

Re:The Truth about Svelte by rmrfchik on Tuesday July 11, 2023 @11:56PM (#36690303)
I don't know should I stick to mustaches (it can be dictated by other reasons), but if I should: {#if expr} {#elseif expr} {#endif}
Re:The Truth about Svelte by doctor_eval on Wednesday July 12, 2023 @12:02AM (#36690330)
These sigils seem to exist to make it easier to balance the expressions. I personally find {#if} … {/if} much more intuitive. {:else} is an unfortunate compromise necessitated by the fact that elseif is ugly in most imperative languages.