Logo with title ".Blog"

Premature features

Published on

Starting to get annoyed by Luau making features available before they’re complete.

Incidentally, tagged unions aren’t refined by the else clause.

The really annoying thing is that the only way to find out a feature is incomplete is to get halfway through writing something only to have the type checker start slapping you with errors for things are logically correct.

If I have a tagged union of A | B, and if v.type=="A" then refines to type A, then logically, else should refine to type B. Yet I have to find out the hard way that it doesn’t.