mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Update records.md
This commit is contained in:
parent
e0d72eda0d
commit
dba42768cd
1 changed files with 5 additions and 1 deletions
|
@ -45,7 +45,7 @@ introduce support for packed records where the table definition must use types a
|
||||||
|
|
||||||
> TODO: It's going to be difficult to migrate to packed records. Is there anything we can do right now to keep this possibility open without enforcing types at runtime?
|
> TODO: It's going to be difficult to migrate to packed records. Is there anything we can do right now to keep this possibility open without enforcing types at runtime?
|
||||||
|
|
||||||
The rest of this proposal goes into syntax and semantics.
|
The rest of this proposal goes into syntax and semantics. The goal of this proposal is to solve the problem of object storage both for simple objects and for classes -- that is, if we add records we won't need to add classes.
|
||||||
|
|
||||||
### Record type
|
### Record type
|
||||||
|
|
||||||
|
@ -167,6 +167,10 @@ Of course, the type checker also knows that the record type has the metatable wi
|
||||||
> TODO: Does the type checker need to understand the internal structure of the shape so that type checking works across modules, or is simply modeling this
|
> TODO: Does the type checker need to understand the internal structure of the shape so that type checking works across modules, or is simply modeling this
|
||||||
> as a metatable sufficient?
|
> as a metatable sufficient?
|
||||||
|
|
||||||
|
### Object modeling
|
||||||
|
|
||||||
|
> TODO: records don't support implementation inheritance and why it's a good thing
|
||||||
|
|
||||||
## Drawbacks
|
## Drawbacks
|
||||||
|
|
||||||
Adding a new data type that is cross-cutting (across syntax, semantics/compiler, semantics/type checking, and runtime) results in added complexity.
|
Adding a new data type that is cross-cutting (across syntax, semantics/compiler, semantics/type checking, and runtime) results in added complexity.
|
||||||
|
|
Loading…
Add table
Reference in a new issue