[#3986] Re: Principle of least effort -- another Ruby virtue. — Andrew Hunt <andy@...>

> Principle of Least Effort.

14 messages 2000/07/14

[#4043] What are you using Ruby for? — Dave Thomas <Dave@...>

16 messages 2000/07/16

[#4139] Facilitating Ruby self-propagation with the rig-it autopolymorph application. — Conrad Schneiker <schneik@...>

Hi,

11 messages 2000/07/20

[ruby-talk:04250] RTFM and/or parser question

From: "Sergey Abel" <abel_sm@...>
Date: 2000-07-28 11:56:52 UTC
List: ruby-talk #4250
Hi,

Excuse me, but I'm not satisfied with the following
example and its explanation in the ruby FAQ:

---
p(nil or "")    # parse error

"or is used to combine expressions in conditionals.
Ruby is not expecting a conditional statement in an argument list. "
---

(BTW, this explanation of 'or' does not agree with syntax.html.)
Even if it was actually a conditional expression (which it is not, I
guess),
I think it should not matter. Any expression yields an object,
doesn't it?!  And of course, I can cope with this problem:

p( (nil or "") )  # parse ok

Maybe, there's something wrong with the parser?
If not, then we definitely need the more strict syntax definition.

Sorry, if I've missed something relevant in ruby-talk threads.
Ruby 1.4.5, Win platform.

Sergey Abel



In This Thread

Prev Next