Open Frityet opened 1 year ago
Doesn't this stray away a little too much from Lua?
It does not make sense for me because a record is an interface and not an implementation.
I can see how such a mechanism could generate code based on metatables and so on but I do not think Teal should do this.
It's not something I intend to implement for records in the foreseeable future.
It would be really cool to be able to define functions inside a record, like so
The equivalent would be in regular teal:
This allows for more compact definitions of records, whilst also creating cleaner code.