Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
doctor_eval
· 3y ago · 0 comments
How would you do it?
Comments
[–]
rmrfchik
3y ago
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}
[–]
doctor_eval
OP
3y ago
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.
[–]
willmartian
3y ago
I much prefer keeping everything XML-ish:
https://www.solidjs.com/docs/latest/api#switchmatch