----- Original Message -----
From: "Bil Kleb" <W.L.Kleb / larc.nasa.gov>
To: "ruby-talk ML" <ruby-talk / ruby-lang.org>
Sent: Saturday, September 07, 2002 8:01 PM
Subject: Re: Larry Wall's comments on Ruby


> Andrew Hunt wrote:
> >
> > Consistency is far more important than familiarity.
>
> But Ruby's consistency gave into familiarity in certain
> (what I consider) fairly significant areas.
>
> 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 or aFile.rename('toThisName'),
> not Math.cos(5) and File.rename(aFile,'toThisName').

5.cos, 5.arcsin, 5.tenthroot, 5.inverse, 5.negative, 5.prime?

It has to stop somewhere.

The methods you can call on numbers are intended, IMO, to represent the things
that numbers have in common.  Operations like cos() make sense as pure
functions.

aFile.rename('tothisname'), while it _looks_ appealing, doesn't make sense.
aFile is a file *object* - it doesn't have a name (see for yourself).
Directories map names to files.  A file can be known by many names.  If Ruby
has a class FileName, then we could do what you want.  (Java's File class is
about file names, not about files).

(I might be wrong ;)

> --
> Bil

Gavin