Properties and macros on WalterAndrei.pdf.

Jason House jason.james.house at gmail.com
Wed Sep 5 21:59:52 PDT 2007


Julio César Carrascal Urquijo wrote:
> Regarding slides 9 through 11 of WalterAndrei.pdf (Uniform Function Call 
>      Syntax) would we be allowed to add properties to a class? For example:
> 
> void foo(Matrix m, char[] value)
> {
>     // ...
> }
> char[] foo(Matrix m)
> {
>     // ...
> }
> 
> m.foo = "parrot";
> writefln("It's a dead %s.", m.foo);    //-> It's a dead parrot.
> 
> 
> Now on pages 45 - 51 on AST Macros... Would it be possible to declare a 
> macro as a static member of a class or struct? Example:
> 
> struct Matrix
> {
>     macro foo(e) { e = 3; }
> }
> 
> Matrix.foo(q);    // I didn't pick the names. Don't blame me for it. ;)
> 
> Thanks

I'm too tired/lazy to look it up, but I could swear that there was a 
line in there saying that this functionality would not extend to macros.



More information about the Digitalmars-d mailing list