From: Robert Klemme Date: 2005-01-26T19:10:47+09:00 Subject: Re: attr "Trans" schrieb im Newsbeitrag news:1106709424.215471.138980@c13g2000cwb.googlegroups.com... > > Not exactly. But since Ruby can treat any object properly in > > a boolean context, why waste some processing cycles on > > conversion if not because of information hiding (i.e. prevent > > leakage of a member value)? > > Well, that wasn't my reasoning when I did it that way. I just thought > it should return boolean (or nil) as one would likely expect from a > ?-method. But I see your point too. But perhaps this information hiding > provides it with some merit offsetting the down side of the extra > processing? Probably. There is also the aspect of resource consumption: if a client stores a boolean flag which is really a complex object of some type GC cannot clear it although the owner might have released it already. > > But you didn't have it either and apparently you missed > > it, didn't you? ;-) > > :-} He he. I suppose so. Well, it started with the casting and sort of > just grew from there. As it often does. :-) Kind regards robert