Operator precedence -- a thought question

Ask a Question related to Ruby, Design and Development.

  1. #1

    Default 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. :)

    Hal



    Hal Fulton Guest

  2. Similar Questions and Discussions

    1. Where Clause: Order of Precedence
      Here's my WHERE clause on an SQL statement I wrote: WHERE blnLive = TRUE AND blnVacPromo = TRUE AND (dtToPost <= Now() AND dtToRemove > Now() ) ...
    2. here's an off-the-wall thought/question
      I've been thinking about how to improve my environment, make it redundant/fault tolerant/highly available and have put together a few ideas from...
    3. #25982 [NEW]: Operator Precedence screwed up from 4.3.2 to 4.3.3?
      From: adiu at adis dot on dot ca Operating system: Linux PHP version: 4.3.3 PHP Bug Type: Unknown/Other Function Bug...
    4. order by precedence?
      I know how to use the order by, but wondered if there is an order of precedence in using it. Facts: hcounty is a county that someone puts in a...
    5. This problem might be harder than I thought...
      Once news group could not figure this out. I must be overlooking something but I am sure there is somebody that can answer this question. Check...
  3. #2

    Default Re: Operator precedence -- a thought question

    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.

    Lyle Johnson Guest

  4. #3

    Default Re: Operator precedence -- a thought question

    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: [email]dossy@panoptic.com[/email]
    Panoptic Computer Network web: [url]http://www.panoptic.com/[/url]
    "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)


    Dossy Guest

  5. #4

    Default Re: Operator precedence -- a thought question

    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..
    gabriele renzi Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139