Re: String mixin syntax sugar

2012-03-21 Thread kennytm
Mantis wrote: > 21.03.2012 13:35, kennytm пишет: >> Mantis wrote: >>> [...] >>> # identifier statement >>> >> You mean 'declaration'. > > Not necessarily, this could be used anywhere a mixin can be. >>> [...] >> The syntax may conflict with '#line'. > > I didn't know. The choice for the symbol

Re: String mixin syntax sugar

2012-03-21 Thread RivenTheMage
On Wednesday, 21 March 2012 at 12:37:50 UTC, Mantis wrote: Builtin annotations' names are not reserved keywords, so this would be possible and ambiguous: string safe( string s ); @safe void foo(); // what @safe stands for? What about "@" for built-in annotations and "@!" for user-defined? @!

Re: String mixin syntax sugar

2012-03-21 Thread dennis luehring
and what about attribute parameters like @serialize(version=2) Am 21.03.2012 13:35, schrieb Mantis: 21.03.2012 13:35, kennytm пОшет: Mantis wrote: [...] # identifier statement You mean 'declaration'. Not necessarily, this could be used anywhere a mixin can be. [...] The synt

Re: String mixin syntax sugar

2012-03-21 Thread Mantis
21.03.2012 13:35, kennytm пишет: Mantis wrote: [...] # identifier statement You mean 'declaration'. Not necessarily, this could be used anywhere a mixin can be. [...] The syntax may conflict with '#line'. I didn't know. The choice for the symbol is not that important however. What to

Re: String mixin syntax sugar

2012-03-21 Thread kennytm
Mantis wrote: > Hello, > > since people discussed a lot about user-defined attributes recently, I've > been thinking about a way to implement it with a string mixins. The > problem with them is their syntax - it's far from what we want to use in > everyday job. I understand, they should be easily

Re: String mixin syntax sugar

2012-03-20 Thread bcs
On 03/20/2012 11:25 AM, Mantis wrote: Hello, since people discussed a lot about user-defined attributes recently, I've been thinking about a way to implement it with a string mixins. The problem with them is their syntax - it's far from what we want to use in everyday job. I understand, they sho

Re: String mixin syntax sugar

2012-03-20 Thread d coder
> Use template mixins? At least in struct/class area that catches the most > attention it should work perfectly. I believe template mixins are equally ugly. Don't you have to explicitly specify that you are invoking a mixin? Or am I missing something here. Regards - Puneet

Re: String mixin syntax sugar

2012-03-20 Thread Tove
On Tuesday, 20 March 2012 at 21:28:25 UTC, Jacob Carlborg wrote: On 2012-03-20 19:25, Mantis wrote: Hello, since people discussed a lot about user-defined attributes recently, I've been thinking about a way to implement it with a string mixins. The problem with them is their syntax - it's far

Re: String mixin syntax sugar

2012-03-20 Thread Jacob Carlborg
On 2012-03-20 19:25, Mantis wrote: Hello, since people discussed a lot about user-defined attributes recently, I've been thinking about a way to implement it with a string mixins. The problem with them is their syntax - it's far from what we want to use in everyday job. I understand, they should

Re: String mixin syntax sugar

2012-03-20 Thread Dmitry Olshansky
On 20.03.2012 22:25, Mantis wrote: Hello, since people discussed a lot about user-defined attributes recently, I've been thinking about a way to implement it with a string mixins. The problem with them is their syntax - it's far from what we want to use in everyday job. Use template mixins? At

String mixin syntax sugar

2012-03-20 Thread Mantis
Hello, since people discussed a lot about user-defined attributes recently, I've been thinking about a way to implement it with a string mixins. The problem with them is their syntax - it's far from what we want to use in everyday job. I understand, they should be easily distinguished at use