[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-talk
Subject:    Re: ANN: Free-form-operators patch
From:       "David A. Black" <dblack () wobblini ! net>
Date:       2004-10-14 12:25:02
Message-ID: Pine.LNX.4.44.0410140512110.13931-100000 () wobblini
[Download RAW message or body]

Hi --

On Thu, 14 Oct 2004, Nikolai Weibull wrote:

> Yes, but it detracts from the whole point of adding the capabilities of
> this patch.   The point isn't to make user-defined operators different
> from built-in ones, the point is to make them indistinguishable from
> them - to allow us, as programmers, to work in the same namespace as
> matz or any of the language designers.  This worries some people, but
> I personally don't see an good reason for worry, if done correctly (i.e.
> not introducing bugs or breakage).  Remember, Ruby allows you to add and
> redefine methods in base classes, so if you want to wreak havoc, the
> tools are readily available even without user-defined operators.

Yes, but first of all people tend not to, and a lot of concern and
thought has gone into (and is still going into) the question of how,
and even whether, it's possible to modify base classes in a safe and
'polite' way.  

Second, the openness of classes (base or otherwise) does not have any
implications for operators, unless you're assuming a kind of
all-or-nothing, single, monolithic design principle for everything in
Ruby (which, luckily for us, there isn't :-)  In other words, by
making classes open, Matz has made classes open, without incurring any
obligation to make an analogous design decision elsewhere in the
language.  That also doesn't mean that user-defined operators are a
bad idea.  It just means that they're being or not being a good idea
is separate from the matter of the openness of classes.  


David

-- 
David A. Black
dblack@wobblini.net


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic