News for hackers. Stuff that matters.
Re:Using “and” and “or” in Ruby by cageface on Monday August 02, 2010 @12:32PM (#1568074)
Agreed.

It's stuff like this that makes me appreciate lisp.

Re:Using “and” and “or” in Ruby by brlewis on Monday August 02, 2010 @01:25PM (#1568269)
This use of "and" and "or" is exactly what a Lisp programmer would expect. They're used that way a lot in Common Lisp and Scheme.
Re:Using “and” and “or” in Ruby by lmkg on Monday August 02, 2010 @02:38PM (#1568548)
The article isn't talking about the short-circuiting behavior, which I agree is what a Lisper would expect. The article is talking about their operator precedence, and why it's useful to have two sets of operators that are identical except for precedence rules. That is something that you won't find in Lisp, not even buried deep in the guts of LOOP.
Re:Using “and” and “or” in Ruby by pjscott on Monday August 02, 2010 @06:06PM (#1569269)
I'm convinced that you can find anything in the guts of LOOP if you look hard enough. Except for an adequate number of parentheses. LOOP doesn't have nearly enough parentheses.
Re:Using “and” and “or” in Ruby by cageface on Monday August 02, 2010 @03:09PM (#1568657)
My point, which downmodders seem to be missing, is that you don't have to rely on the language's magic operator precedence rules in lisp do this kind of thing. The syntax is yours to command.
Re:Using “and” and “or” in Ruby by ihodes on Monday August 02, 2010 @01:44PM (#1568359)
It's funny you say that, because I just used this technique to make a few lines of my Clojure (a Lisp) code a little neater. I find it more readable, and prettier.