Eloquently sums up my feelings about the disadvantages of dynamic typing

simendsjo simendsjo at gmail.com
Wed Oct 16 12:08:40 PDT 2013


On Wednesday, 16 October 2013 at 19:00:07 UTC, Jacob Carlborg 
wrote:
> On 2013-10-16 20:38, Andrei Alexandrescu wrote:
>
>>> Seems like it would only work on binary built-in attributes.
>>
>> Yah.
>
> Why?
>
> enum foo;
>
> @foo:
>
> !@foo void bar ();

You're right. That would be nice for generic code for instance to 
mark that it's done processing an attribute.

> Just as if @foo wasn't attached to "bar". Although I don't know 
> that to do with multiple attributes of the same type:
>
> @(foo, foo) void bar ();
>
> Remove all?

Remove all would probably be more in sync with getAttributes that 
returns all attributes, but removing only the first would allow 
greater flexibility. It's easy to remove all if you have a way to 
remove one, but the other way around isn't as easy :)


More information about the Digitalmars-d mailing list