From: Wirianto Djunaidi Date: 2002-09-09T14:26:37+09:00 Subject: Re: Larry Wall's comments on Ruby --- Harry Ohlsen wrote: > > For example, we only have "everything's an object" > behavior > > for some math intrinsics and the interface for > files is a bit > > strange, e.g., I expected 5.cos > > This one's been discussed a lot before. > > > ...or aFile.rename('toThisName'), > > I think the way to look at this is to think "who" it > is that does the > renaming. In the case of a file, it's effectively > the filesystem that does > (eg in UNIX, it involves changing the contents of a > directory file). > > I think it makes more sense to ask the class (ie, > the thing that logically > knows *about* files) to do it ... hence, I feel this > case isn't surprising. > Totally agree. It's the same case as with the 5.cos doesn't make sense because cos(), sin(), etc..are not behaviour of a number in regular sense. Those are trigonometry functions which applied on those numbers. __________________________________________________ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com