On 10/15/05, Robert Klemme <bob.news / gmx.net> wrote:

> PS: Note also the alternative approach of Array[]:

Indeed - I mentioned it above ("aliasing :[] to new") and have been
using it for years (since I saw it in matju's X11 lib). I've always
liked it myself but have recently discovered that others find it a bit
strange. Also, since I've been using Rails, I've started to use :[] as
an alias for :find so I can do things like this:

  person = Person[:where => "name like 'A%'"]

This seems a more natural fit - i.e. thinking of Person as an extent /
container that you get things out of fits better with the normal use
of :[] as an fetch operator.

I was wondering if the Object() syntax might be a better solution as
an alias for new. It has the precedence of Array(), Integer(), etc.

As Dave says, method names should be lowercase so it wouldn't affect
anyone who's been following the rules!

I wasn't aware that Trans had already suggested this - can anyone
point me to the discussion?

Cheers,

Sean