|
|
|
|
|
by mrbluecoat
376 days ago
|
|
Great job! An impressive set of functionality for an initial release. The syntax is also quite intuitive in general but these were a bit odd to me: (int,bool,bool) t = (1, true, false) // v: Define a tuple. Access elements using t[0], t[1], t[2] string? s = null |
|
The tup is an interesting question. I often think about tup(int, bool, string) vs (int, bool, string). I convince myself that there might be a better choice.
`var t = (1 as i8, true, false)` Use automatic inference to replace active type declarations.
t.0 vs t[0] is equally difficult to choose, but t[0] is the more commonly used syntax. Using t[n] consistently across map/vec/set/tup might be the more correct decision.