Re: Attributes on parameters in functions.

2015-10-31 Thread Jacob Carlborg via Digitalmars-d
On 2015-10-30 22:28, TheFlyingFiddle wrote: In other languages that have Attributes (Java and C# atleast) I can do stuff like this: (Java) //com.bar.java interface Bar { /*stuff*/ } //com.foo.java class Foo { Foo(@Bar int a) { //some stuff } } I don't seem to be able to do

Re: Attributes on parameters in functions.

2015-10-31 Thread TheFlyingFiddle via Digitalmars-d
On Saturday, 31 October 2015 at 12:45:13 UTC, Jacob Carlborg wrote: On 2015-10-30 22:28, TheFlyingFiddle wrote: In other languages that have Attributes (Java and C# atleast) I can do stuff like this: (Java) //com.bar.java interface Bar { /*stuff*/ } //com.foo.java class Foo { Foo(@Bar int

Attributes on parameters in functions.

2015-10-30 Thread TheFlyingFiddle via Digitalmars-d
In other languages that have Attributes (Java and C# atleast) I can do stuff like this: (Java) //com.bar.java interface Bar { /*stuff*/ } //com.foo.java class Foo { Foo(@Bar int a) { //some stuff } } I don't seem to be able to do this in D. That is I cannot do this: enum Bar;

Re: Attributes on parameters in functions.

2015-10-30 Thread Meta via Digitalmars-d
On Friday, 30 October 2015 at 21:28:09 UTC, TheFlyingFiddle wrote: In other languages that have Attributes (Java and C# atleast) I can do stuff like this: (Java) //com.bar.java interface Bar { /*stuff*/ } //com.foo.java class Foo { Foo(@Bar int a) { //some stuff } } I don't

Re: Attributes on parameters in functions.

2015-10-30 Thread Timon Gehr via Digitalmars-d
On 10/31/2015 02:02 AM, Meta wrote: On Friday, 30 October 2015 at 21:28:09 UTC, TheFlyingFiddle wrote: ... I know I can technically do. Match! or M! instead of the @ symbol to achieve the same effect which is probably what I will end up doing but it would be nice if we could use attributes in