Yet a new properties proposal

Dimitar Kolev DimitarRosenovKolev at hotmail.com
Wed Jul 29 15:07:19 PDT 2009


Steven Schveighoffer Wrote:

> On Wed, 29 Jul 2009 17:46:39 -0400, Dimitar Kolev  
> <DimitarRosenovKolev at hotmail.com> wrote:
> 
> > Steven Schveighoffer Wrote:
> >
> >> On Wed, 29 Jul 2009 14:59:38 -0400, Dimitar Kolev
> >> <DimitarRosenovKolev at hotmail.com> wrote:
> >>
> >> > Steven Schveighoffer Wrote:
> >> >
> >> >> I don't see what advantages this has over other proposals.  What is
> >> >> wrong
> >> >> with a.a such that we have to resort to a#a?
> >> >>
> >> >> -Steve
> >> >>
> >> >
> >> > People are crying over compilers not know which is a property and  
> >> which
> >> > is not.
> >>
> >> At definition time, not usage time.  I want the usage to be identical to
> >> fields, otherwise, it's not as seamless.  This makes an important
> >> difference for generic code.
> >
> > What if the compiler just expanding this to well inlining. So a#a = 3  
> > would just means a.a = 3 just that the compiler will have easier time  
> > understanding this.
> 
> If you specify a property at definition by doing int#a, then why do you  
> also need to specify it's a property when calling it?  And if it's not  
> necessary, then your proposal is no different than adding a keyword.  On  
> those merits, it's fine with me if people think int #a is better than  
> property int a, but I absolutely don't want to have to modify my code to  
> call properties using a #.
> 
> -Steve

Since when is D 2.0 frozen so that we have to take care of old D 2.0 code.

This is not an accusation just a reminder. Hope ware not going for the mistakes of C++.



More information about the Digitalmars-d mailing list