On Thursday, 17 January 2013 at 07:27:35 UTC, Jacob Carlborg
wrote:
On 2013-01-17 02:59, Joseph Cassman wrote:
I was wondering what the syntax is for user defined attributes
(i.e. bug
9222) implemented in release 2.061. I was still unclear after
reading
the thread
forum.dlang.org/thread/k7afq6
On Thursday, 17 January 2013 at 04:38:14 UTC, Ali Çehreli wrote:
On 01/16/2013 05:59 PM, Joseph Cassman wrote:
[...]
/* This template is not directly related. (I expect it to be in
Phobos; maybe
* it's already there. (?))
*/
template hasAttribute(T, AttributeInQuestion)
[...]
Ali
hasAtt
On 2013-01-17 08:20, Era Scarecrow wrote:
Oh yes, do UDA's only work on types? or do they work on
functions/methods/delegates too? If you have it on a function how could
that be useful?
You can basically attach an UDA to any declaration. I think the
exception is parameters.
--
/Jacob Carl
UDAs very design point is to never change type they are attached
to.
If you want to inject code in a class/struct at compile-time,
template mixins are supposed tools.
On 2013-01-17 02:59, Joseph Cassman wrote:
I was wondering what the syntax is for user defined attributes (i.e. bug
9222) implemented in release 2.061. I was still unclear after reading
the thread forum.dlang.org/thread/k7afq6$2832$1...@digitalmars.com.
Here's the documentation:
http://dlang.o
On Thursday, 17 January 2013 at 06:55:57 UTC, Ali Çehreli wrote:
On 01/16/2013 09:45 PM, Era Scarecrow wrote:
(Do they have to be structs?) If they don't and you add code,
can that code help/add or modify the attributed object (or can
it at all?).
It looks like some mixin magic can be used.
On 01/16/2013 09:45 PM, Era Scarecrow wrote:
> (Do they have to be structs?) If they
> don't and you add code, can that code help/add or modify the attributed
> object (or can it at all?).
It looks like some mixin magic can be used.
> Do the structs have to be empty?
They can have members. get
On Thursday, 17 January 2013 at 04:38:14 UTC, Ali Çehreli wrote:
On 01/16/2013 05:59 PM, Joseph Cassman wrote:
I was wondering what the syntax is for user defined attributes
(I.e. bug 9222) implemented in release 2.061. I was still
unclear after reading the thread
forum.dlang.org/thread/k7afq6
On 01/16/2013 05:59 PM, Joseph Cassman wrote:
I was wondering what the syntax is for user defined attributes (i.e. bug
9222) implemented in release 2.061. I was still unclear after reading
the thread forum.dlang.org/thread/k7afq6$2832$1...@digitalmars.com.
Thanks for the help
Joseph
The follo
I was wondering what the syntax is for user defined attributes
(i.e. bug 9222) implemented in release 2.061. I was still unclear
after reading the thread
forum.dlang.org/thread/k7afq6$2832$1...@digitalmars.com.
Thanks for the help
Joseph
10 matches
Mail list logo