mirror of
https://github.com/luau-lang/luau.git
synced 2025-04-02 01:40:54 +01:00
Mark singleton types and unsealed table literals RFCs as implemented (#438)
This commit is contained in:
parent
75bccce3db
commit
af64680a5e
8 changed files with 21 additions and 14 deletions
|
@ -17,17 +17,10 @@ This document tracks unimplemented RFCs.
|
|||
|
||||
## Sealed/unsealed typing changes
|
||||
|
||||
[RFC: Unsealed table literals](https://github.com/Roblox/luau/blob/master/rfcs/unsealed-table-literals.md) |
|
||||
[RFC: Only strip optional properties from unsealed tables during subtyping](https://github.com/Roblox/luau/blob/master/rfcs/unsealed-table-subtyping-strips-optional-properties.md)
|
||||
|
||||
**Status**: Implemented but not fully rolled out yet.
|
||||
|
||||
## Singleton types
|
||||
|
||||
[RFC: Singleton types](https://github.com/Roblox/luau/blob/master/rfcs/syntax-singleton-types.md)
|
||||
|
||||
**Status**: Implemented but not fully rolled out yet.
|
||||
|
||||
## Safe navigation operator
|
||||
|
||||
[RFC: Safe navigation postfix operator (?)](https://github.com/Roblox/luau/blob/master/rfcs/syntax-safe-navigation-operator.md)
|
||||
|
@ -47,3 +40,9 @@ This document tracks unimplemented RFCs.
|
|||
[RFC: Generalized iteration](https://github.com/Roblox/luau/blob/master/rfcs/generalized-iteration.md)
|
||||
|
||||
**Status**: Needs implementation
|
||||
|
||||
## Lower Bounds Calculation
|
||||
|
||||
[RFC: Lower bounds calculation](https://github.com/Roblox/luau/blob/master/rfcs/lower-bounds-calculation.md)
|
||||
|
||||
**Status**: Needs implementation
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
# bit32.countlz/countrz
|
||||
|
||||
**Status**: Implemented
|
||||
|
||||
## Summary
|
||||
|
||||
Add bit32.countlz (count left zeroes) and bit32.countrz (count right zeroes) to accelerate bit scanning
|
||||
|
||||
**Status**: Implemented
|
||||
|
||||
## Motivation
|
||||
|
||||
All CPUs have instructions to determine the position of first/last set bit in an integer. These instructions have a variety of uses, the popular ones being:
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
# coroutine.close
|
||||
|
||||
**Status**: Implemented
|
||||
|
||||
## Summary
|
||||
|
||||
Add `coroutine.close` function from Lua 5.4 that takes a suspended coroutine and makes it "dead" (non-runnable).
|
||||
|
||||
**Status**: Implemented
|
||||
|
||||
## Motivation
|
||||
|
||||
When implementing various higher level objects on top of coroutines, such as promises, it can be useful to cancel the coroutine execution externally - when the caller is not
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
# Safe navigation postfix operator (?)
|
||||
|
||||
**Note**: We have unresolved issues with interaction between this feature and Roblox instance hierarchy. This may affect the viability of this proposal.
|
||||
|
||||
## Summary
|
||||
|
||||
Introduce syntax to navigate through `nil` values, or short-circuit with `nil` if it was encountered.
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
> Note: this RFC was adapted from an internal proposal that predates RFC process
|
||||
|
||||
**Status**: Implemented
|
||||
|
||||
## Summary
|
||||
|
||||
Introduce a new kind of type variable, called singleton types. They are just like normal types but has the capability to represent a constant runtime value as a type.
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
# Relaxing type assertions
|
||||
|
||||
**Status**: Implemented
|
||||
|
||||
## Summary
|
||||
|
||||
The way `::` works today is really strange. The best solution we can come up with is to allow `::` to convert between any two related types.
|
||||
|
||||
**Status**: Implemented
|
||||
|
||||
## Motivation
|
||||
|
||||
Due to an accident of the implementation, the Luau `::` operator can only be used for downcasts and casts to `any`.
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
# Unsealed table assignment creates an optional property
|
||||
|
||||
**Status**: Implemented
|
||||
|
||||
## Summary
|
||||
|
||||
In Luau, tables have a state, which can, among others, be "unsealed".
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
# Unsealed table literals
|
||||
|
||||
**Status**: Implemented
|
||||
|
||||
## Summary
|
||||
|
||||
Currently the only way to create an unsealed table is as an empty table literal `{}`.
|
||||
|
@ -73,4 +75,4 @@ We could introduce a new table state for unsealed-but-precise
|
|||
tables. The trade-off is that that would be more precise, at the cost
|
||||
of adding user-visible complexity to the type system.
|
||||
|
||||
We could continue to treat array-like tables as sealed.
|
||||
We could continue to treat array-like tables as sealed.
|
||||
|
|
Loading…
Add table
Reference in a new issue