@property - take it behind the woodshed and shoot it?

monarch_dodra monarchdodra at gmail.com
Fri Jan 25 03:24:56 PST 2013


On Friday, 25 January 2013 at 11:01:31 UTC, mist wrote:
> On Friday, 25 January 2013 at 10:26:14 UTC, Robert burner 
> Schadek wrote:
>> ...
>> Yes, the syntax is legit. It's the semantic that "scares" me. 
>> IMHO it feels strange that assigning a variable resizes a 
>> array. Something like a.resize(10) would make me feel better.
>
> Ye, it was one of the first "Erm wtf?" moments when I started 
> to learn D. And living confirmation that core developers don't 
> really have a strong vision what properties should be.

I can view *reading* size as a property, but I don't think the 
setter itself should be a property, since it actually *does* 
something. Heck, it can throw an exception (!)

However, I really think we are way past the point we can change 
array's interface. I'd just leave it be.


More information about the Digitalmars-d mailing list