Open jimafisk opened 2 years ago
Svelte's templating language prefixes conditionals like {#if answer === 42} and {:else} which sometimes confuses folks: https://github.com/htmlx-org/HTMLx/issues/12
{#if answer === 42}
{:else}
Removing the # and : was proposed in Svelte at one point when discussing syntax changes (https://github.com/sveltejs/svelte/issues/1318#issuecomment-379434039), but the core team thought this would making parsing too difficult.
#
:
If feasible, it would probably be more familiar for most folks to simply use syntax like {if answer === 42} and {else} and {/if}. The same would go for loops: {each} and {/each}
{if answer === 42}
{else}
{/if}
{each}
{/each}
Svelte's templating language prefixes conditionals like
{#if answer === 42}
and{:else}
which sometimes confuses folks: https://github.com/htmlx-org/HTMLx/issues/12Removing the
#
and:
was proposed in Svelte at one point when discussing syntax changes (https://github.com/sveltejs/svelte/issues/1318#issuecomment-379434039), but the core team thought this would making parsing too difficult.If feasible, it would probably be more familiar for most folks to simply use syntax like
{if answer === 42}
and{else}
and{/if}
. The same would go for loops:{each}
and{/each}