More keywords? Or fewer?
Russell Lewis
webmaster at villagersonline.com
Sat May 3 07:33:07 PDT 2008
Janice Caron wrote:
> On 03/05/2008, Russell Lewis <webmaster at villagersonline.com> wrote:
>> So I asked myself: are there any other common programming models that D
>> doesn't have? And it struck me: most interpreted languages have duck typing
>> and hold-any-value variables. Is there space for that in D?
>
> We already have hold-any-value variables!
>
> std.variant.Variant
Hmm...I'll have to go look that up!
> We also effectively have compile-time duck typing (but not runtime
> duck typing), because that's just how templates work. Runtime...? Hmm.
> That would require runtime reflection, I think.
After I wrote my previous post, it occurred to me the opDot, combined
with an associative array, might give us duck typing.
In other words, we might *already* have all of this! (Just hidden
behind a little bit of syntax.)
More information about the Digitalmars-d
mailing list