Suggestion: properties should be treated as 'virtual members variables'

Steve Horne stephenwantshornenospam100 at aol.com
Sat Sep 9 09:41:13 PDT 2006


On Fri, 8 Sep 2006 10:15:45 -0400, "Jarrett Billingsley"
<kb3ctd2 at yahoo.com> wrote:

>When you try to pass a property to it, what happens?  Properties are 
>methods, not variables.  They have to be called, they can't just be 
>dereferenced.

Yeah, I know. I guess I'm just used to C++ creating temporaries
whenever it feels like it.

I guess the problem with that is that the temporaries aren't free, and
aren't always cheap. So better to think extra hard before adding a
compiler feature that people will get dependent on.

It still feels wrong, though, to have properties that can't always do
the job of the data fields they are meant to replace. Still much
better than not having properties, though.

-- 
Remove 'wants' and 'nospam' from e-mail.



More information about the Digitalmars-d mailing list