custom attribute proposal (yeah, another one)

Timon Gehr timon.gehr at gmx.ch
Fri Apr 6 07:53:56 PDT 2012


On 04/06/2012 04:23 PM, Steven Schveighoffer wrote:
> Why should we be restricted to only structs? Or any type for that matter?
>

A restriction to only structs is not a restriction because structs can 
have arbitrary field types.

> The benefit to using CTFE functions is that the compiler already knows
> how to deal with them at compile-time. i.e. less work to make the
> compiler implement this.
>

It is exactly the same amount of work because CTFE is able to execute 
struct constructors.



More information about the Digitalmars-d mailing list