(this analysis should have been done before the RFC but the thought never crossed my mind)
There's 63K assertions in all luarocks repositories combined. Out of this, around ~600 assertions would be broken as a result of this change. This is ~1% which is pretty uncomfortable (I was hoping for a couple of odd unit tests) - as such this RFC is going to get closed. We will maintain the current behavior of assert and try to adapt type checker to be reasonably useful instead.
The common thread between all of these cases (many of them target custom APIs although some target core APIs like string.match) is that assert is used together with a function that either returns nil (for errors), or multiple arguments. Under these conditions multi-arg assert is useful.
A couple examples:
```
out_r, out_w = assert(unix.pipe())
local header, body = assert(data:match "(.-\r\n)\r\n(.*)")
local z85_secret_key, z85_public_key = assert(zmq.curve_keypair())
local _, r = assert(coroutine.resume(co, msg))
```
This finishes the set of fully baked/accepted RFCs; 3 more proposals have been accepted but not implemented yet and will be submitted separately as actual RFCs.
* Base for the April post
* Finished April 2021 recap post
* Removed features that are not enabled yet (bye, type-checking section)
* Update docs/_posts/2021-04-30-luau-recap-april-2021.md
Co-authored-by: Arseny Kapoulkine <arseny.kapoulkine@gmail.com>
* Update docs/_posts/2021-04-30-luau-recap-april-2021.md
Co-authored-by: Arseny Kapoulkine <arseny.kapoulkine@gmail.com>
* Update docs/_posts/2021-04-30-luau-recap-april-2021.md
Co-authored-by: Arseny Kapoulkine <arseny.kapoulkine@gmail.com>
* Added 'Coming Soon' for type refinements
Co-authored-by: Arseny Kapoulkine <arseny.kapoulkine@gmail.com>
Call out the upcoming change to `print` and slightly reword a couple of rows. Also add a list of differences from 5.x that was previously requested (the list is likely incomplete)
* Removed incorrect info
The manual says Luau does not support hexadecimal \0x, Unicode \u and \z
when this clearly isn't the case.
This is also quite confusing as just a bit below it says it does support them.
Co-authored-by: Arseny Kapoulkine <arseny.kapoulkine@gmail.com>
It was somewhat outdated from the current Luau world. Some changes to fix that problem.
1. Global assignments are now allowed in nonstrict mode.
2. The example that assigns to `x` from the argument `y` in the function `f` was needlessly complicated. I elected to delete it.
3. Require tracing docs shouldn't need to explain the three possible outcomes.
This reflects the code changes we've made to upgrade string library:
- Updated the match implementation to 5.2, adding support for `%g` and `\0` in patterns
- Added string pack/unpack from 5.3