From: Seebs Date: 2009-11-22T13:25:21+09:00 Subject: Re: Order of evaluation and precedence On 2009-11-21, Rick DeNatale wrote: > I think you are confusing precedence ordering with evaluation strategy. I am not. > Precedence determines the order in which the > operators/functions/methods are performed. Right. But the book says that the expressions are evaluated in that order... > But the timing of when the argument expressions is evaiuated is a > different issue. The reason I asked is not that I'm generally unaware of this, but rather, that many people believe that this means that everything inside () has to be performed before anything outside of (), for instance. I was trying to figure out whether the statement that precedence affects order of evaluation meant that it controlled the order in which subexpressions were evaluated, or just the grouping and ordering of operators. > Ruby like most other languages uses what is called applicative > ordering, which means that the arguments to a function are evaluated > before the function is called (or applied). They don't need to be > evaluated JUST before the function is applied, just BEFORE it is. Right. That was what I was expecting. But now I am confused, because I thought I asked that and Matz said that it did control the order of evaluation, but now I think he said it doesn't. Which I'm guessing means that evaluation of operators follows precedence order (or at least, everything looks as though it did). -s -- Copyright 2009, all wrongs reversed. Peter Seebach / usenet-nospam@seebs.net http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!