language.types · type ·
tuple of A, B (gated)
A grouped pair of values; requires the explicit tuple-values experiment in the manifest.
A focused reference with a complete example. Numeric widths and experimental types still depend on the selected backend.
tuple of A, B (gated)Status: experimental
Tuple opt in
Prefer a named thing when the values have domain meaning. Use tuples only for deliberate compiler research behind the feature gate.
cpu · complete-program · type checked
SplitScore(text name, int score) returns tuple of text, int
{
return tuple(name, score)
}
tuple of text, int pair = SplitScore("Ava", 7)
deconstruct pair into player, score
Console.Log(player)
Console.Log(Text.From(score))
project.mech
package = "tests.compiler.experiments.tupleOptIn"
version = "0.1.0"
backend = "cpu-oracle"
experiments = ["tuple-values"]
Notes and source
demonhunterlabs/app/lib/yeho-language-reference.ts