A Discussion of Tuple Syntax
bearophile
bearophileHUGS at lycos.com
Tue Aug 20 07:57:36 PDT 2013
Kenji Hara:
> So, std.typecons.Tuple _is not special_. You can define another
> Tuple struct in the same way.
> We should not define new syntax for the library utility
> std.typecons.Tuple.
With your idea is there a way to unpack a short array into
variables? This is an handy operation I do often in Python:
>>> s = "red blue"
>>> (a, b) = s.split()
>>> a
'red'
>>> b
'blue'
Bye,
bearophile
More information about the Digitalmars-d
mailing list