On Tue, Aug 16, 2005 at 16:59:12 -0400, Mark Reed wrote:
> On 2005-08-16 16:45, "Nicholas Clark" <[EMAIL PROTECTED]> wrote:

> > I'd find it hard defending a language that treated 1.e5 as a method call.
> 
> Guess we shouldn't sign you up for the Ruby Defense League, then?
> 
> irb(main):001:0> 1.e5
> NoMethodError: undefined method `e5' for 1:Fixnum
>         from (irb):1
> irb(main):002:0> 

Well, I think the only sane alternative is to implement AUTOMETHOD
on int that makes it a float:

        method AUTOMETHOD {
                # parse scientific notation of method name (e.g. "e5"),
                # and apply it to the invocant, returning a float
        }

There, no ambiguity.

-- 
 ()  Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418  perl hacker &
 /\  kung foo master: /me spreads pj3Ar using 0wnage: neeyah!!!!!!!!!!!

Attachment: pgpTcztTCimYb.pgp
Description: PGP signature

Reply via email to