Property rewriting; I feel it's important. Is there still time?

Steven Schveighoffer schveiguy at yahoo.com
Fri Mar 12 04:47:43 PST 2010


On Fri, 12 Mar 2010 04:06:27 -0500, Pelle Månsson  
<pelle.mansson at gmail.com> wrote:

> On 03/11/2010 09:37 PM, Steven Schveighoffer wrote:
>> BTW, C# doesn't do this:
>> -Steve
>
> I still think D should, it makes little sense not to. What is gained  
> from limiting arbitrarily?

It has been pointed out that C#'s properties are "right" after 4 years of  
development.  I was just pointing out that C# doesn't agree with what has  
been proposed.

I am undecided whether I like the idea of chained properties performing  
this trick.  As long as we can guarantee that it truly is the correct  
choice on the compiler's part, I have no problem.  This may mean  
disallowing compilation a la C# in certain cases where the compiler is  
unsure.  You can always workaround by writing the steps manually (as the  
C# error message suggests).

-Steve



More information about the Digitalmars-d mailing list