I guess between perl and Ruby and Scheme etc. I got used to
creating hybrid containers
Want a pair of [string, fileList]? Just make an Array with two
items, one a string, one and array of strings. Done.
D barfed... leaving me momentarily stunned... then Oh Yes, type
safety, Tuple's are t
On Monday, 23 June 2014 at 21:18:39 UTC, John Carter wrote:
I guess between perl and Ruby and Scheme etc. I got used to
creating hybrid containers
Want a pair of [string, fileList]? Just make an Array with two
items, one a string, one and array of strings. Done.
D barfed... leaving me mo
On 6/23/14, 6:18 PM, John Carter wrote:
I guess between perl and Ruby and Scheme etc. I got used to creating
hybrid containers
Want a pair of [string, fileList]? Just make an Array with two items,
one a string, one and array of strings. Done.
D barfed... leaving me momentarily stunned... th
Ary Borenszweig:
As a library solution I would do something like this:
Union!(int, string)[] elements;
elements ~= 1;
elements ~= "hello";
Take a look at Algebraic in Phobos.
Bye,
bearophile
On Monday, 23 June 2014 at 21:26:19 UTC, Chris Williams wrote:
More likely what you want are variants:
Hmm. Interesting.
Yes, Variant and VariantArray are much closer to the dynamic
language semantics...
But the interesting thing is Tuple is much closer to "What I
Mean" when I create thes
On Monday, 23 June 2014 at 21:49:29 UTC, Ary Borenszweig wrote:
Union types are very common (I use them every day), and IMHO
it's very nice to have them included in the language (either
built-in or as a library solution). As a library solution I
would do something like this:
Union!(int, stri
On Monday, 23 June 2014 at 22:11:57 UTC, John Carter wrote:
On Monday, 23 June 2014 at 21:49:29 UTC, Ary Borenszweig wrote:
Union types are very common (I use them every day), and IMHO
it's very nice to have them included in the language (either
built-in or as a library solution). As a library
On Monday, 23 June 2014 at 22:08:59 UTC, John Carter wrote:
On Monday, 23 June 2014 at 21:26:19 UTC, Chris Williams wrote:
More likely what you want are variants:
Hmm. Interesting.
Yes, Variant and VariantArray are much closer to the dynamic
language semantics...
But the interesting thing