Full documentation for the standard library, written from scratch by looking at the source code - so hopefully this is reasonably correct/precise.
Some of the function descriptions are probably too concise to be easily understandable - we can flesh this out in the future.
Some of the type specifications aren't using valid Luau syntax; in particular, I've used "function" or "table" in a few places as a human-friendly notion that any function/table suffices, and the iterator functions just say that they return <iterator> without being specific as to what the signature of the generator is.
* RFC: Default type alias type parameters
* Update the motivating example to match actual motivating example
* Resolved review comments
* improved motivation for the feature and noted additional languages with this feature
* fixed terminology between 'argument' and 'parameter'
* brought back support for default type pack parameter values
* removed alternative syntax and described the decision between ':' and '=' in the design section
* fixed drawback text and provided an example
* Remove return type pack annotation from allowed type pack default values,type annotation syntax doesn't allow that to be stand-alone
* Generic type pack has to be referenced by generic type pack name (with ...)
A large number of changes to the HATRA '21 position paper. We've abandoned the 4pp limit, which allows us to add more detail to some sections, and use more appropriate wording throughout the paper. A rough changelog:
* Numerous wording tweaks
* Removed `\cite{???}`
* Added type inference section
* Introduction beefed up
* Abstract slightly tweaked
Co-authored-by: Alan Jeffrey <403333+asajeffrey@users.noreply.github.com>
* July post is ready
* Trigger a build
* Trigger a build
* Added a paragraph for 'DuplicateConditions' lint
* Apply suggestions from code review
Co-authored-by: Arseny Kapoulkine <arseny.kapoulkine@gmail.com>
* Fix mixed tabs and spaces
Co-authored-by: Arseny Kapoulkine <arseny.kapoulkine@gmail.com>
Added a position paper on Luau for submission to HATRA 2021
Co-authored-by: Lily Brown <lbrown@roblox.com>
Co-authored-by: Andy Friesen <afriesen@roblox.com>
* Template for the June post
* June post is ready
* Fixed post date
* Added a few examples
* Add another equality operator
* Update docs/_posts/2021-06-30-luau-recap-june-2021.md
Co-authored-by: Arseny Kapoulkine <arseny.kapoulkine@gmail.com>
* Note the limitation of current constraint resolver
Co-authored-by: Arseny Kapoulkine <arseny.kapoulkine@gmail.com>
Restore the original sentence with tweaks; this seems like better wording since it highlights the importance of knowing the field name at compile time, no matter the notation.
* Added May 2021 recap post
* Added missing items and fixed confusing function declaration example
* Apply suggestions from code review
Co-authored-by: Arseny Kapoulkine <arseny.kapoulkine@gmail.com>
* Small fix
Co-authored-by: Arseny Kapoulkine <arseny.kapoulkine@gmail.com>
We don't have mid-block return support yet and it's not clear if we will due to similar grammatical issues with this wrt function calls, but noting this for completeness (thanks @alexmccord for bringing this up)
It seems more consistent and unambiguous if we mark RFCs as being
implemented when the implementation lands instead of expecting to
cross-reference documentation. That also makes it easier for us to flag
stale RFCs.
(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.