Template args to UDA's

Kenji Hara k.hara.pg at gmail.com
Tue May 28 18:18:48 PDT 2013


2013/5/29 Manu <turkeyman at gmail.com>

> Either way, the attribute certainly looks like it's part of the
> declaration, I think any reasoning programmer would assume that it is. It's
> only a DMD implementation detail that says otherwise, and it's not
> particularly intuitive to a programmer.
>

It's not a dmd implementation detail. It is part of current D language
design. dmd works as well. No bug there, so this is definitely an
enhancement.

But I can agree that is a little not good from human sense. I know a
related issue.

struct S {
    immutable int foo() {}    // immutable is prefix attribute (==storage
class)
}

In above, `immutable` would be applied to the declaration `foo`, not its
return type `int`.

But, changing semantics would break much existing code. Your enhancement
belongs same area. We need to get agreement of D programmers first.

Kenji Hara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130529/c0a7f058/attachment.html>


More information about the Digitalmars-d mailing list