3 ms·
> (It would be weird if tuples were written "{1, 2, 3}", right?) That is the case in Crystal. Doesn't feel weird - if anything it is consistent in that ()s alw
by yxhuvud 7y ago
> (It would be weird if tuples were written "{1, 2, 3}", right?)
That is the case in Crystal. Doesn't feel weird - if anything it is consistent in that ()s always denote something to do with execution. Both ()s and {}s have multiple different other syntactic usages though, so it is not as if either is optimal.
- int_19h 7y agoMost languages that offer tuples, either use (), or just treat commas as "tuple operator" anywhere they don't have another meaning already. And this goes a long time back. Function calls can then be treated as functions from a single tuple argument, as is idiomatic in SML.