@property - take it behind the woodshed and shoot it?
mist
none at none.none
Fri Jan 25 09:00:29 PST 2013
On Friday, 25 January 2013 at 16:53:43 UTC, deadalnix wrote:
> Because you invalidate most legitimate use of a setter.
Erm.. Whaaat? How this case is legitimate at all? Please
elaborate. In example you define a @property for some data type
and then try to assign to this property without using any
context. It is like calling class method and skipping "this". As
I have mentioned in other thread, there are 2 contradictory
approaches: either free-form property has semantics of global
variable or it has semantics of data member of its first
argument. Not both.
> A struct with a function pointer and data already exists in D.
> This is called a delegate.
And additional hidden implementation complications differ it from
all other function types. Rare special case for clearly defined
situations. I like it that way. Leave function to be just like
good old C function.
More information about the Digitalmars-d
mailing list