From: Greg Fodor Date: 2007-05-25T08:45:03+09:00 Subject: Re: Introducing the "it" keyword > How about something like: return $1 if (v + 1) < 10 if you wanted to > return v + 1? If you wanted to return v you could use: return $2 if > ((v) +1) < 10. Improvements would be using some of the regular > expression flags to control what $1, $2, etc. refer to. I like this better than def it() since it seems more intentional, but it too results in side effects into global space and prevents GCing early. Another problem is that you run into problems mixing the meaning of parenthesis, since within a given expression in your example you may not want to set aside storage space for all parenthesized expressions, despite the fact you may need to enforce order of operations. For example: puts $2 if (x + y) * (a - b) < 10 will copy the result of x + y in RAM even if your parentheses are there to simply make the add happen first. Having it be something new in this context like pipes separates concerns and avoids these technical consequences. FYI, this would be: puts it if (x + y) * |(a - b)| < 10 We just get temp storage for a - b and preserve a single meaning of parentheses.