Hello --

On Wed, 15 May 2002, Dossy wrote:

> On 2002.05.15, David Alan Black <dblack / candle.superlink.net> wrote:
> >
> > Personally I don't like it: it still feels to me like #to_a (on what
> > at least "feels" like a string) is magically interpolating values that
> > weren't there.  This makes me question in what sense it is going "to"
> > an array -- or, to put it another way, "to_a" seems like the wrong
> > name for what is happening here.
>
> You're not dealing with a string.  You're dealing with a Param,
> that's like a String with (essentially) an Array mixed in.

Right, but what I'm saying is that this Param on which I'm remarking
(and whose non-String-ness I fully acknowledge :-)  behaves in ways I
find awkward.

> Do you always feel uncomfortable subclassing String or Array,
> or is it because you feel that a Param really wants to be
> something else entirely?  Not from a code-view perspective,
> but from an object hierarchy perspective ...

It's more that it feels too trick-like (as opposed to tricky, which
has connotations of slyness that I don't intend :-) as a way to get at
the first element of an array and/or the whole array.  But I guess
something's got to give -- if you don't want to have the [0] index,
then the intelligence has to be encapsulated somewhere.


David

-- 
David Alan Black
home: dblack / candle.superlink.net
work: blackdav / shu.edu
Web:  http://pirate.shu.edu/~blackdav