www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: Yet a new properties proposal

reply Sjoerd van Leent <svanleent gmail.com> writes:
Dimitar Kolev Wrote:

 Just make all properties accessed by # and you will save yourself the
ambiguities of calling a function or a property with the same names.

I understand your idea, but it is contrary to the common understanding that a property is a replacement of a field. As thus, from the users perspective, a property should look and act the same as a field. The this rules out another symbol.
Jul 31 2009
parent reply Rainer Deyke <rainerd eldwood.com> writes:
Sjoerd van Leent wrote:
 I understand your idea, but it is contrary to the common
 understanding that a property is a replacement of a field. As thus,
 from the users perspective, a property should look and act the same
 as a field.
 
 The this rules out another symbol.

Unless fields use the same new symbol. -- Rainer Deyke - rainerd eldwood.com
Jul 31 2009
parent reply Sjoerd van Leent <svanleent gmail.com> writes:
Rainer Deyke Wrote:

 Sjoerd van Leent wrote:
 I understand your idea, but it is contrary to the common
 understanding that a property is a replacement of a field. As thus,
 from the users perspective, a property should look and act the same
 as a field.
 
 The this rules out another symbol.

Unless fields use the same new symbol. -- Rainer Deyke - rainerd eldwood.com

Yes, but won't that reintroduce the problems that are already available?
Jul 31 2009
parent Michiel Helvensteijn <m.helvensteijn.remove gmail.com> writes:
Sjoerd van Leent wrote:

 The this rules out another symbol.

Unless fields use the same new symbol.

Yes, but won't that reintroduce the problems that are already available?

The solution is easy. You just add a second # to properties. :-) -- Michiel Helvensteijn
Jul 31 2009