The implementation of Glimmer is really interesting, but feels like over-engineering after seeing what a compiler like Svelte can do. Here is what it would look like:
<script>
let maxLength = 10;
let name = "", remaining, showError;
$: showError = remaining < 0;
$: remaining = maxLength - name.length;
</script>
<div>
<input bind:value={name} />
<p class:showError>{remaining}</p>
</div>
And the gist of the runtime produced is this: if (dirty & 1 && input.value !== ctx[0]) set_input_value(input, ctx[0]);
if (dirty & 2) set_data(t1, ctx[1]);
if (dirty & 4) toggle_class(p, "showError", ctx[2]);
wired up directly to the input event which computes the dirty flags. No VM in the middle. It is quite literally impossible to get more efficient than that. Are there still any advantages to this approach?