Commit Graph

74 Commits

Author SHA1 Message Date
Arseny Kapoulkine
b39fcc7e77
Mark __len RFC as implemented 2022-08-03 15:38:45 -07:00
Alexander McCord
cb16555608
RFC: Disallow name T and name(T) in future syntactic extensions for type annotations (#589) 2022-07-28 14:48:17 -07:00
Alexander McCord
185370fa1d
RFC: Update the rules on string interpolation in light of feedback (#615)
We make four adjustments in this RFC:

1. `{{` is not allowed. This is likely a valid but poor attempt at escaping coming from C#, Rust, or Python.
2. We now allow `` `this` `` with zero interpolating expressions.
3. We now allow `` f `this` `` also.
4. Explicitly say that `` `this` `` and `` `this {that}` `` are not valid type annotation syntax.
2022-07-28 14:48:05 -07:00
Arseny Kapoulkine
ea7a6c1260
Spell out RFC considerations for library functions more explicitly (#603)
When considering new standard library functions, we essentially need to strongly justify their existence over their implementation in Luau in user library code.

This PR attempts to provide a few axes of consideration; ideally new library functions tick many of the boxes, eg "used often + is more performant + clear unambiguous interface" is an ideal consideration for a library function, whereas if it's merely accelerating a single specific use case for a single application it's unlikely to be a good justification for inclusion.
2022-07-19 08:37:56 -07:00
Arseny Kapoulkine
c29b803046
Update STATUS.md
Add __len metamethod
2022-06-28 09:08:12 -07:00
Arseny Kapoulkine
fd82e92628
RFC: Support __len metamethod for tables and rawlen function (#536) 2022-06-28 09:06:59 -07:00
Arseny Kapoulkine
348ad4d417
Update STATUS.md
Add never and unknown types
2022-06-22 12:54:48 -07:00
Arseny Kapoulkine
1757234f01
Rename none-and-unknown-types.md to never-and-unknown-types.md
This makes the type names match.
2022-06-22 11:16:38 -07:00
Alan Jeffrey
778e62c8f7
RFC: never and unknown types (#434)
Co-authored-by: Alexander McCord <11488393+alexmccord@users.noreply.github.com>
2022-06-22 11:15:41 -07:00
Arseny Kapoulkine
ca5fbbfc24
Mark generalized iteration RFC as implemented 2022-06-09 10:18:29 -07:00
Arseny Kapoulkine
bcab792e0d
Update STATUS.md
Generalized iteration got implemented, safe indexing got dropped.
2022-06-09 10:18:03 -07:00
Arseny Kapoulkine
b8ef743721
RFC: Do not implement safe navigation operator (#501)
This meta-RFC proposes removing the previously accepted RFC on safe navigation operator. This is probably going to be disappointing but is the best course of action that reflects our ideals in language evolution.

See PR thread for rationale and discussion.
2022-06-09 10:03:37 -07:00
Arseny Kapoulkine
87fe15ac51
Update STATUS.md
Mark last table subtyping RFC as implemented
2022-05-12 10:08:36 -07:00
Arseny Kapoulkine
a775e6dc8e
Mark last table subtyping RFC as implemented 2022-05-12 10:08:10 -07:00
Arseny Kapoulkine
105e74c7d9
Update STATUS.md
Both generalized iteration and LBC are implemented but not fully enabled in Roblox yet.
2022-05-11 15:14:51 -07:00
Arseny Kapoulkine
af64680a5e
Mark singleton types and unsealed table literals RFCs as implemented (#438) 2022-03-29 16:58:59 -07:00
Andy Friesen
75bccce3db
RFC: Lower Bounds Calculation (#388)
Co-authored-by: vegorov-rbx <75688451+vegorov-rbx@users.noreply.github.com>
2022-03-29 12:37:14 -07:00
Arseny Kapoulkine
5e7e462104
Update STATUS.md 2022-03-24 13:10:56 -07:00
Arseny Kapoulkine
ab64a097cd
Mark sealed table subtyping RFC as implemented 2022-03-24 13:10:30 -07:00
Arseny Kapoulkine
b8e025311b
Mark table.clone as implemented 2022-03-24 09:29:20 -07:00
Arseny Kapoulkine
5a21c41363
Update STATUS.md 2022-03-24 09:26:42 -07:00
Alexander McCord
7ab76e582c
RFC: Do not implement non-nil postfix ! operator. (#420)
This is a meta-RFC. I'd like to propose to remove the postfix `!` operator from the language.

I'd like to argue that this operator will eventually become useless and can only be used incorrectly at some point in the future, and that there are likely ways for them to be sound without having to reach for the `!` hammer.

With that, I present these counterarguments:

Shortcoming <span>#</span>1: Refinements does not apply to the block after `return`/`break`/`continue`.

```lua
if not x or not y then return end
-- both x and y are truthy
```

This will be solved by implementing control flow analysis where it'd apply the inverse of the condition leading up to the control transfer statement to the rest of the scope.

Shortcoming <span>#</span>2: Type checker is not aware of the actual state of various locations.

```lua
type Foo = { x: { y: number }? }?
local foo: Foo = { x = { y = 5 } }
print(foo.x.y) -- prints 5 at runtime, type checker warns on this
```

This will be solved by implementing type states where it would inspect the initialization sites as well as assignments to know their actual states. That is, rather than trusting the type annotation `Foo` as the state which gets us far enough, we'd start seeing these type annotations as a subtype constraint for the location `foo`.

---

If there are other use cases not covered in this message, we should talk about that and see if there exists an alternative direction that can solve these use cases soundly.
2022-03-24 08:38:16 -07:00
Alexander McCord
2f15079642
Fold in rationale for making else branch mandatory in if-then-else expressions. (#426)
This has been discussed but just didn't get incorporated into the RFC.
2022-03-23 16:53:52 -07:00
Arseny Kapoulkine
898c0501d1
Update STATUS.md
Add table.clone
2022-02-28 14:16:35 -08:00
Arseny Kapoulkine
5e8242aeda
RFC: table.clone (#362) 2022-02-28 14:15:33 -08:00
Arseny Kapoulkine
3c42b3a013
Revert "Mark singleton types RFC as implemented (#370)" (#378)
This reverts commit 731e197757.
2022-02-19 10:57:29 -08:00
Alexander McCord
731e197757
Mark singleton types RFC as implemented (#370) 2022-02-17 16:16:31 -08:00
Arseny Kapoulkine
e49a0fd4cd
Mark default type parameters RFC as implemented (#369) 2022-02-17 16:14:35 -08:00
Arseny Kapoulkine
e541e19f44
Create RFC status tracking document (#363)
This tracks status of all unimplemented RFCs in one central place. Hopefully we won't forget to update this when new RFCs are added!
2022-02-15 18:37:02 -08:00
Arseny Kapoulkine
7d679b317f
RFC: Generalized iteration (#335)
Co-authored-by: dcope-rbx <91100513+dcope-rbx@users.noreply.github.com>
Co-authored-by: vegorov-rbx <75688451+vegorov-rbx@users.noreply.github.com>
2022-02-14 10:04:07 -08:00
Arseny Kapoulkine
a23b467485
Add turbofish discussion to generic function RFC (#300) 2022-01-07 11:07:36 -08:00
Arseny Kapoulkine
287b46e6a7
Mark bidirectional ascription RFC as implemented (#305) 2022-01-07 11:07:22 -08:00
Arseny Kapoulkine
b5e338325b
Mark coroutine.close RFC as implemented (#304) 2022-01-07 08:52:33 -08:00
Alan Jeffrey
82587bef29
RFC: Fix an unsoundness issue around stripping optional properties (#276)
* Fix an unsoundness issue around stripping optional properties

Co-authored-by: vegorov-rbx <75688451+vegorov-rbx@users.noreply.github.com>
2022-01-06 12:48:09 -06:00
boyned//Kampfkarren
5e7648947b
RFC: Safe navigation operator (#142)
Co-authored-by: Alexander McCord <11488393+alexmccord@users.noreply.github.com>
2021-12-20 15:38:15 -08:00
vegorov-rbx
71adace16e
RFC: Amend 'Default type alias type parameters' for type pack parameters (#238)
* Do not allow regular type assignment to a type pack as a default parameter

* With type pack support in type aliases, this second form with an empty list is now supported

* Update rfcs/syntax-default-type-alias-type-parameters.md

Co-authored-by: Alan Jeffrey <403333+asajeffrey@users.noreply.github.com>

* Update syntax-default-type-alias-type-parameters.md

Even more examples

Co-authored-by: Alan Jeffrey <403333+asajeffrey@users.noreply.github.com>
2021-12-08 04:21:47 -08:00
Arseny Kapoulkine
9488f2379d
Mark bit32.count* RFC as implemented 2021-12-03 11:10:41 -08:00
vegorov-rbx
6b2b179aa6
Mark 'Type alias type packs' RFC as implemented (#237) 2021-11-23 10:03:20 -08:00
Alexander McCord
6958716ccd
RFC: String interpolation (#165) 2021-11-22 14:59:38 -08:00
Arseny Kapoulkine
4265e58ad1
RFC: coroutine.close (#88) 2021-11-17 06:49:49 -08:00
Alan Jeffrey
59366ad7f8
Clarified parsing properties of tables in the presence of singleton types (#207) 2021-11-16 14:48:01 -06:00
Arseny Kapoulkine
70ffc8a01d
RFC: Do not allow method call on string literals (#145) 2021-11-12 06:54:00 -08:00
Arseny Kapoulkine
fe1bf43b54
RFC: bit32.countlz/countrz (#89)
Co-authored-by: vegorov-rbx <75688451+vegorov-rbx@users.noreply.github.com>
2021-11-09 10:40:14 -08:00
Josh Soref
278e848cc2
Spelling (#119)
Fixed various spelling errors.

Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
2021-11-04 09:50:46 -05:00
Arseny Kapoulkine
1f0084daa3 Mark RFCs that were implemented as such. 2021-11-03 21:35:25 -07:00
Amber's Careware
eed3c8c38f
Update config-luaurc.md (#104)
When running `luau-analyze` with a .luarc that has a "mode" key, it outputs the following:
> .luaurc: Unknown key mode
I'm assuming it was named "mode" at first and was re-named "languageMode" later on?
2021-11-03 13:15:51 -07:00
Arseny Kapoulkine
05a41d5d54
Remove team restriction from RFC process documentation
Fixes #98
2021-11-03 12:13:42 -07:00
vegorov-rbx
0fd38fd765
RFC: Type alias type packs (#83) 2021-10-27 11:53:45 -07:00
Alan Jeffrey
59c0492419
RFC: Write-only properties (#79)
Co-authored-by: vegorov-rbx <75688451+vegorov-rbx@users.noreply.github.com>
2021-10-27 11:42:17 -07:00
Alan Jeffrey
628d7d9fcd
RFC: Read-only properties (#77)
* Added rfcs/property-readonly.md

Co-authored-by: vegorov-rbx <75688451+vegorov-rbx@users.noreply.github.com>
2021-10-11 09:58:01 -05:00