From e792a0997bd9b1dccfc53e67094de352d38a2d24 Mon Sep 17 00:00:00 2001 From: "Daniel P H Fox (Roblox)" Date: Mon, 4 Nov 2024 16:03:30 -0800 Subject: [PATCH] Update syntax-named-function-type-returns.md --- docs/syntax-named-function-type-returns.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/syntax-named-function-type-returns.md b/docs/syntax-named-function-type-returns.md index b2ff865..9e0798b 100644 --- a/docs/syntax-named-function-type-returns.md +++ b/docs/syntax-named-function-type-returns.md @@ -139,6 +139,14 @@ local blue, red = "blue", "red" poem(blue, red) --> roses are blue violets are red ``` +The same principle also applies to multiple assignment in existing parts of Luau: + +``` +for value, key in pairs({"hello", "world"}) do + print(value) --> 1 2 +end +``` + So, this proposal posits that there is already established precedent for such features, and that users understand how comprehension aids function in Luau today. A common concern is whether these comprehension aids would mislead people into believing that names are significant when considering type compatibility.