Why are opCall's not implicitely assignable?
Ivan Senji
ivan.senji_REMOVE_ at _THIS__gmail.com
Tue Sep 26 21:15:09 PDT 2006
Karen Lanrap wrote:
> Derek Parnell wrote:
>
>> with car.roof
>> {
>> .topcoat = COLOR.RED;
>> .undercoat = COLOR.WHITE;
>> }
>>
>> is nice too.
>
> Until someone says: topcoat is _not_ a color. It is concrete material
> that surely must have a property called color, but it is not a color
> itself: this code is totally unreadable for me.
IMO (and knowing this NG) this is about a point in time where you will
stop getting responses to your posts. It usually has something to do
with a person refusing to understand a principal as basic as this one.
As for the example. It is all up to you: if topcoat is a color property then
with car.roof
{
.topcoat = COLOR.RED;
.undercoat = COLOR.WHITE;
}
else (it is a property of type coat):
with car.roof
{
.topcoat.color = COLOR.RED;
.undercoat.color = COLOR.WHITE;
}
>
> (By the way: forgetting to delete a point can have desastrous results
> in D.)
What point?
More information about the Digitalmars-d-learn
mailing list