Momentary Eh?! for a Dynamic Language Programmmer. Tuples vs Arrays. Just rambling.

John Carter via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jun 23 15:08:58 PDT 2014


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 these things.

I probably should used Rubies
    http://ruby-doc.org/core-2.0/Struct.html
but apart from naming the elements it gives me nothing beyond 
more keystrokes to enter.

Tuple is very similar, but also grants type safety.


More information about the Digitalmars-d-learn mailing list