Proposal: user defined attributes

F i L witte2008 at gmail.com
Wed Mar 21 09:27:39 PDT 2012


On Wednesday, 21 March 2012 at 16:21:21 UTC, Andrei Alexandrescu 
wrote:
> On 3/21/12 11:15 AM, F i L wrote:
>> Andrei Alexandrescu wrote:
>>> Is this implemented, or a thought?
>>
>> Just a thought (I even accidentally reversed the key-value 
>> order), but I
>> don't see why it couldn't work. I'll try and make up a quick
>> implementation.
>
> Wouldn't a better approach rely on a compile-time structure 
> instead of a hash?

I'm not sure, you're understand of D's compiler-time structures 
is much better than mine. Serialization "attributes" are mostly 
used at runtime, so having mixing in a static enum *should* mean 
reflection upon the property at both runtime and compiletime.




More information about the Digitalmars-d mailing list