[Issue 8785] feature request: static mixin

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jan 27 12:21:20 PST 2013


http://d.puremagic.com/issues/show_bug.cgi?id=8785



--- Comment #2 from luka8088 <luka8088 at owave.net> 2013-01-27 12:21:19 PST ---
(In reply to comment #1)
> What this would basically do is introduce namespaces into the language, as 't1'
> would be some kind of pseudo-type which has access to its parent, but it itself
> wouldn't be a template (since it doesn't require !()), and it wouldn't be an
> aggregate.
> 
> Not that there's anything wrong with that. :)
> 
> Anyway for the longest time I actually thought "mixin myTemplate t1" means the
> symbols are only accessible through "t1", but the spec does say it's only used
> for disambiguating so I was wrong.

I also thought this way, until I read the docs properly. It would be useful in
some cases to have both behaviors. "static" is proposed because it is already
used with imports in this way - "import" vs "static import". Maybe "static" is
not the best keyword/solution for this case but it is the first solution that
came to mind.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list