Should pure nothrow ---> @pure @nothrow ?
Don
nospam at nospam.com
Fri Nov 27 04:59:22 PST 2009
Lars T. Kyllingstad wrote:
> Don wrote:
>> #ponce wrote:
>>>> Definitely. And what about @deprecated and @override?
>>>
>>> As override is now required, i don't think it should be an attribute.
>>
>> As I understand it, one of the characteristics of attributes is that
>> you should be able to remove them from the entire program, without
>> affecting the behaviour. All they are doing is adding additional
>> compile-time constraints. (const and immutable aren't attributes,
>> because you're allowed to overload functions based on them).
>
> If this is the rule, shouldn't the protection attributes be moved into
> the annotation namespace as well? (@private, @protected, @package,
> @public) Since everything is public by default in D, a program will keep
> working even if you remove them.
>
> NOTE: I don't necessarily think they should, but I do think there should
> be a definite rule for which attributes are @annotations and which
> aren't. Otherwise it just seems random.
>
> -Lars
Obviously my rule isn't correct. It's hard to come up with a rule that
includes @property, without including everything else.
More information about the Digitalmars-d
mailing list