The Wrong Stuff
Michel Fortin
michel.fortin at michelf.com
Mon Oct 25 08:01:48 PDT 2010
On 2010-10-25 10:32:45 -0400, Bruno Medeiros
<brunodomedeiros+spam at com.gmail> said:
> On 26/09/2010 14:26, Michel Fortin wrote:
>> Unfortunately, one attribute with the @ syntax in D -- and I'd say the
>> flagship one as it was the first and most discussed -- is not a pure
>> annotation as it has a noticeable effect on semantics. I'm talking about
>> @property which, if it ever get implemented, changes your function so it
>> simulates a field. In Herb's terms, @property is clearly a keyword in
>> disguise.
>
> You don't want attributes to affect semantics? That's odd, it seems to
> me the most useful scenarios for @attributes is actually to affect
> semantics, and they're somewhat limited otherwise.
> I mean, what exactly do you mean by "effect on semantics" ?
What I meant is that @property actually *changes* the semantics:
calling the function becomes a different thing and the function lose
its regular semantics. Other attributes only *restrict* existing
semantics, they don't change the existing semantics beyond making
illegal some things which are normally legal.
--
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/
More information about the Digitalmars-d
mailing list