Re: Calling delegate properties without parens

2012-04-15 Thread Piotr Szturmaj
Artur Skawina wrote: On 04/15/12 03:01, Piotr Szturmaj wrote: Artur Skawina wrote: @property is for functions masquerading as data, i'm not sure extending it to pointers and delegates would be a good idea. What you are asking for is basically syntax sugar for: struct CommonInputRange(E)

Re: Calling delegate properties without parens

2012-04-15 Thread Piotr Szturmaj
Jonathan M Davis wrote: On Saturday, April 14, 2012 20:47:20 Piotr Szturmaj wrote: struct CommonInputRange(E) { @property bool delegate() empty; @property E delegate() front; void delegate() popFront; } front returns an element in the range. In your case, it's returning a

Calling delegate properties without parens

2012-04-14 Thread Piotr Szturmaj
I have following code: import std.array, std.range, std.stdio; struct CommonInputRange(E) { @property bool delegate() empty; @property E delegate() front; void delegate() popFront; } void main(string[] args) { alias CommonInputRange!dchar DCRange; static

Re: Calling delegate properties without parens

2012-04-14 Thread Artur Skawina
On 04/14/12 20:47, Piotr Szturmaj wrote: I have following code: import std.array, std.range, std.stdio; struct CommonInputRange(E) { @property bool delegate() empty; @property E delegate() front; void delegate() popFront; } void main(string[] args) { alias

Re: Calling delegate properties without parens

2012-04-14 Thread Jonathan M Davis
On Saturday, April 14, 2012 20:47:20 Piotr Szturmaj wrote: I have following code: import std.array, std.range, std.stdio; struct CommonInputRange(E) { @property bool delegate() empty; @property E delegate() front; void delegate() popFront; } void main(string[] args)