On Fri, May 25, 2012 at 3:57 AM, Matthew Kerwin <[email protected]> wrote:
> On 25 May 2012 01:14, Robert Klemme wrote:
>> On Thu, May 24, 2012 at 4:50 PM, botp wrote:

>> I wouldn't do that, there is a certain risk that it looks like a
>> typing error (i.e. someone assumes you meant "if r==foo...")
>
> Clear documentation and commenting can help there.

But where is the point in searching for a short, concise idiom and
which then needs added documentation to avoid errors?

>> But I think the idiom with "and" is superior. :-)
>
> It's concise, but it's a very idiomatic idiom.  At a glance it's
> harder to understand than the 'if r=foo..' construct (which is also
> idiomatic).  If you use it in all your code, however, I won't
> complain. ;)

I would actually consider it an advantage if it stands out so much as
strange: that way you do not glance over it easily (what might happen
with "if r=foo") and if you do not know it you'll soon find out. :-)

Kind regards

robert

-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

-- You received this message because you are subscribed to the Google Groups 
ruby-talk-google group. To post to this group, send email to 
[email protected]. To unsubscribe from this group, send email 
to [email protected]. For more options, visit this 
group at https://groups.google.com/d/forum/ruby-talk-google?hl=en

Reply via email to