Function pointers/delegates default args were stealth removed?
foobar
foo at bar.com
Wed Aug 29 06:38:45 PDT 2012
On Wednesday, 29 August 2012 at 07:00:06 UTC, Marco Leise wrote:
> Am Mon, 27 Aug 2012 19:46:57 +0200
> schrieb "foobar" <foo at bar.com>:
>
>> The point was that there are _other_ motivating examples for
>> annotations hence there's already popular demand for it. Which
>> is why it's worth the added complexity to the language. In
>> fact part of that complexity *already* exists in D syntax via
>> built-in annotations (e.g @safe).
>
> Properties are currently implemented as "strip off the @ and
> continue". They are mapped to storage class bit flags, like the
> others with no special code paths or data structures in place.
I was talking about complexity added to _the language_ and its
syntax - the part exposed to the user. I did not mean to imply
anything about the compiler implementation of it. If what you say
is true, it just shows that those features such as pure shouldn't
have got the @ prefix in the first place.
Anyway, my main point was:
a. There already is popular demand for metadata.
b. We already have some of the desired syntax for it in the
language
c. Once the facility is fully implemented and supports user
defined annotations it could also be leveraged to implement
default arguments as well.
More information about the Digitalmars-d
mailing list