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

List:       ruby-talk
Subject:    Re: ANN: Free-form-operators patch
From:       Markus <markus () reality ! com>
Date:       2004-10-12 1:11:35
Message-ID: 1097543484.15571.633.camel () lapdog ! reality ! com
[Download RAW message or body]

On Mon, 2004-10-11 at 17:43, Austin Ziegler wrote:
> On Mon, 11 Oct 2004 00:19:01 +0900, Markus <markus@reality.com> wrote:
> >      At it's core, all this patch does is remove the asymmetry in how
> > operator tokens are defined (to include any combination of operator
> > characters, using a simplified for of the code for identifiers).
> 
> Mmmm. By this do you mean that you lose the automatic definition of +=
> when you define + ? If this is the case, I think that it's entirely
> too dramatic. I depend on this behaviour in a few things.

     Not at all.

     First off, + is already a user definable operator, so it's
unaffected.

     But second, even supposing that neither += nor + was built in,
changing the definition of + would not affect += any more than changing
the definition of MyClass#zoo would be expected to affect the definition
of MyClass#zookeeper.

     The asymmetry referred to in the comment you quoted was between
identifiers (which can be any non-reserved sequence of identifier
characters) and operators (which can not, without the patch, be any
non-reserved combination of operator characters).

     -- Markus




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

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