Operator precedence -- a thought question

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. :slight_smile:

Hal

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. :slight_smile:

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.

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. :slight_smile:

:slight_smile:

– Dossy

···

On 2003.11.22, Hal Fulton hal9000@hypermetrics.com wrote:


Dossy Shiobara mail: dossy@panoptic.com
Panoptic Computer Network web: http://www.panoptic.com/
“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)

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 :slight_smile:

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

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

···

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. :slight_smile: