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

List:       ruby-talk
Subject:    Re: ANN: Free-form-operators patch
From:       Nikolai Weibull <ruby-talk () pcppopper ! org>
Date:       2004-10-14 12:22:48
Message-ID: 20041014122239.GC9328 () puritan ! pcp ! ath ! cx
[Download RAW message or body]

* ts <decoux@moulon.inra.fr> [Oct 14, 2004 13:30]:
> > 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.

>  Well, for me an operator is defined by
>   * it's type (unary, binary, tertiary)

Sure, easy to fix.

>   * associativity (right, left, non-assoc)

True, this could become and issue.

>   * precedence

Definitely.

> If I can't define all of this, it's useless for me. If I can define
> it, my user-operator will probably conflict with the same
> user-operator defined by someone else.

I really don't follow this reasoning.

>  Like has said matz, this will freeze ruby (matz don't have the
>  possibility to add new operator).

?  You mean that matz won't be able to add new operators as they may
have user-defined equivalents?  I explained the solution to that issue
in the rest of my mail.

>  And sincerely, I don't want that ruby finish like APL with %$@%

Have you _actually_ done any _real_ programming in APL, or are you
simply using it as an example without knowing anything about APL, more
than that it has a rather one-line oriented syntax?  I don't want APL
either, but that's beside the point.  You can't define new operators in
APL and you basically can't extend the language with anything else
either.  (At least this was true for the first incarnations of the
language.) Learning APL isn't very different than reading the Java
SDK/API.  Furthermore, APL didn't start looking like Algol and then
converge to its current incarnation.  It was always meant to be a
concise, mathematical, representation of a program.  Did you know that
there actually exists a verbose syntax for APL as well?  Anyway, it's
domain is more or less limited to mathematical expressions, which it is
very well suited for.  So, until Ruby becomes a purely mathematically
oriented programming language, your worries are unwarranted.
	nikolai

--
::: name: Nikolai Weibull    :: aliases: pcp / lone-star / aka :::
::: born: Chicago, IL USA    :: loc atm: Gothenburg, Sweden    :::
::: page: www.pcppopper.org  :: fun atm: gf,lps,ruby,lisp,war3 :::
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}

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

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