@property needed or not needed?
Adam D. Ruppe
destructionator at gmail.com
Tue Nov 20 06:13:50 PST 2012
On Tuesday, 20 November 2012 at 13:50:10 UTC, Regan Heath wrote:
> Usually I'd agree but this is a case of a wart we should just
> remove IMO. The fix for breaking cases is simple, add
> @property.
meh, I sometimes use it, but if overloading on @property works,
that's easy enough to allow both ways.
I use it in some big chaining things:
Element.make("div").className("foo").value = "bar";
vs
auto element = Element.make("div");
element.className = "foo";
element.value = "bar";
Using one or the other depending on if I have a variable name
there anyway. This would be arguably *better* with separation,
but I don't have the level of hatred for one function used both
ways (on setter nor getter) the way a lot of people do.
More information about the Digitalmars-d
mailing list