-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
#12412 # Summary
The following fails:
const foo = ("Pi", (3.141, 5))
let (name, (fv, i)) = foo
echo("Name=", name, " fv = ", fv, "i = ", i)
Description
Obvious
Alternatives
One alternative is to use single level tuples and unwrap each nesting separately.
const foo = ("Pi", (3.141, 5))
let (name, fvi) = foo
let (fv, i) = fvi
echo("Name=", name, " fv = ", fv, "i = ", i)
Having nested tuples work without this limitation seems more Nim-ish to me. If it makes it easier, I'd be fine with mandatory parens on tuples.
Additional Information
Metadata
Metadata
Assignees
Labels
No labels