Do we want functions to act as properties, or merely omit parens for ufcs/chaining?
eles
eles at eles.com
Tue Jan 29 03:26:08 PST 2013
On Tuesday, 29 January 2013 at 11:13:19 UTC, jerro wrote:
> to the one used for functions. That way, you can avoid
> verbosity and the need to use implicit parameters
What do you eran from that? Sparing "value" as a reusable
identifier? You define a getter at the top of the class, then
finding a setter three screens lower and you finnaly learn that
the property is not that "read-only"?
I think the first step into better property
definition/implementation/comprehension would be exactly that: to
force the code of the getter and the code of the setter to stick
together.
Yes, exactly at the user of a property I was thinking. That user
is also a programmer, but he does not do the implementation of
the property, just using it.
The confusion does not lie with that user, but it was sparked
when the implementation decision was made, in the very heads of
those who started implementing properties as
just-another-function.
This confusion propagates from the implementors to the user, as
the (usage) syntax issues are issues for the user.
It also does not help that, for the time being, the users of
properties are also the implementors of properties. There is not
much objectivity in this case.
More information about the Digitalmars-d
mailing list