Luau goes open-source
From <a href="https://luau-lang.org/typecheck" rel="nofollow">https://luau-lang.org/typecheck</a><p>> Luau’s type system is structural by default<p>I think that makes it the second (production-ready) language to have a primarily-structural type system, after TypeScript/Flow(/and Closure to some extent) for JS. I wonder if it will follow in their impressive footsteps or if it will tread new territory.<p>One of the things that Flow gets right that TypeScript doesn't yet support is switching to nominal type-checking between class instances. In TypeScript you can assign an instance of one class to an instance of another as long as they have compatible fields. Compare:<p>Flow: <a href="https://bit.ly/3jZx4rB" rel="nofollow">https://bit.ly/3jZx4rB</a><p>TS: <a href="https://tsplay.dev/mZaL1N" rel="nofollow">https://tsplay.dev/mZaL1N</a><p>TypeScript doesn't have any understanding of prototypes or prototypal inheritance, which is a big gap considering that it's a fundamental aspect of JS.<p>I'm really hoping Luau will come to do the right thing with tables and prototypes. Perhaps it already does, but unfortunately there doesn't seem to be a Luau playground to try in the browser.