Tuple DIP

rikki cattermole rikki at cattermole.co.nz
Sun Jan 14 00:01:15 UTC 2018


On 13/01/2018 11:45 PM, Timothee Cour wrote:
> some people have suggested using `{a, b}` instead of `(a,b)` ; this
> would not work because of ambiguity, eg:
> `auto fun(){ return {}; }`
> already has a meaning, so the empty tuple would not work.
> so `()` is indeed better.

Easy fix, tuples must have a length greater than 0.
A tuple with length 0 is by definition void.



More information about the Digitalmars-d mailing list