[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Operator precedence -- a thought question

Hal E. Fulton

11/22/2003 3:35:00 AM

Hypothetically, suppose one wanted to introduce a new operator into
Ruby. And suppose one wanted to decide on a precedence for it.

How would you proceed?

Sure, I'm being vague. Deal with it. :)

Hal



3 Answers

Lyle Johnson

11/22/2003 3:47:00 AM

0

Hal Fulton wrote:

> Hypothetically, suppose one wanted to introduce a new operator into
> Ruby. And suppose one wanted to decide on a precedence for it.
>
> How would you proceed?
>
> Sure, I'm being vague. Deal with it. :)

In true Ruby spirit, how about picking the precedence which is least
surprising? Especially if this operator is already available in other
language(s) and a precedent for its (umm) precedence exists.

Dossy

11/22/2003 3:54:00 AM

0

On 2003.11.22, Hal Fulton <hal9000@hypermetrics.com> wrote:
> Hypothetically, suppose one wanted to introduce a new operator into
> Ruby. And suppose one wanted to decide on a precedence for it.
>
> How would you proceed?

Arbitrarily.

> Sure, I'm being vague. Deal with it. :)

:-)

-- Dossy

--
Dossy Shiobara mail: dossy@panoptic.com
Panoptic Computer Network web: http://www.pan...
"He realized the fastest way to change is to laugh at your own
folly -- then you can let go and quickly move on." (p. 70)


gabriele renzi

11/22/2003 3:31:00 PM

0

il Sat, 22 Nov 2003 12:35:07 +0900, Hal Fulton
<hal9000@hypermetrics.com> ha scritto::

>Hypothetically, suppose one wanted to introduce a new operator into
>Ruby. And suppose one wanted to decide on a precedence for it.
>
>How would you proceed?
>
>Sure, I'm being vague. Deal with it. :)
>

mh.. I think you should go with the precedence it has in another
language if it is imported from there. Other way, do what you want :)

Btw, this makes me wonder what the heck you're doing..
It seem there is some room for a RubyMutations[1] page now :)


[1] with Guy's StrongRuby (I just invented the name, see ruby talk
85780), with MetaRuby , SRuby (from Robert Feldt I think) JRuby..