Re:Teal – A statically-typed dialect of Lua
by krapp on Friday May 16, 2025 @08:54AM
(#44004879)
You can't have typed tables without giving up tables as the language's single data structure. You would have tables and typed tables which are essentially just arrays with extra steps.
Re:Teal – A statically-typed dialect of Lua
by 90s_dev on Friday May 16, 2025 @09:07AM
(#44005027)
Not with type erasure like TypeScript does. Then it would just be type checking hints as to how the table is used, not a different kind of table. Teal does this.
Is that true ... you can't have typed tables without giving up tables as a data structure?