You can use @property there, but you don't have to because you
can call it with optional parenthesis anyway.
On Sunday, 14 June 2015 at 12:36:43 UTC, Adam D. Ruppe wrote:
You can use @property there, but you don't have to because you
can call it with optional parenthesis anyway.
Thanks.
Is there a good reference for the current state of @property?
I know it was hotly debated for awhile (and maybe
Suppose I have a function defined like so:
void foo(int i) { }
intended to be called like:
5.foo
Should it be labeled with @property?
Or is @property only for true member functions?
On Sunday, 14 June 2015 at 12:53:43 UTC, rcorre wrote:
Is there a good reference for the current state of @property?
Easy: it does absolutely nothing right now.
I'm just never sure when I should be using it (if at all).
You should really only use it when you know the function is
On Sunday, 14 June 2015 at 12:53:43 UTC, rcorre wrote:
Is there a good reference for the current state of @property?
I know it was hotly debated for awhile (and maybe still is?).
I'm just never sure when I should be using it (if at all).
Oh yes:
On Sun, 14 Jun 2015 12:26:52 +, rcorre wrote:
Suppose I have a function defined like so:
void foo(int i) { }
intended to be called like:
5.foo
Should it be labeled with @property?
Or is @property only for true member functions?
only if you plan to use it like `foo = 5;`. i.e.
On Sun, 14 Jun 2015 18:21:39 +0200, Timon Gehr wrote:
only if you plan to use it like `foo = 5;`.
You can use it like that anyway.
sure, but i'm talking about style, not about compiler demands.
i.e. exactly like field variable.
struct S{
void delegate() dg;
}
int main(){
On 06/14/2015 05:50 PM, ketmar wrote:
On Sun, 14 Jun 2015 12:26:52 +, rcorre wrote:
Suppose I have a function defined like so:
void foo(int i) { }
intended to be called like:
5.foo
Should it be labeled with @property?
Or is @property only for true member functions?
only if you plan