On Fri, Feb 15, 2013 at 5:46 PM, Alex Gutteridge
<[email protected]> wrote:

> It's quite common in Ruby to alias methods if that improves readability.
> Whether you consider the additional code worthwhile seems to me a pretty
> subjective call. Generally I would agree with you though that generating a
> whole new method just for negation seems a bit OTT. I would also rewrite the
> first method using alias to make it even more obvious that that is all it
> is.

Absolutely agree!  I also find the "is_a_" prefix ugly - usually where
in Java you have isFeature() in Ruby you just have feature?.  And
given that doing

alias feature? featured?

doesn't really sound worthwhile I'd probably scrap both methods.

Kind regards

robert


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

-- 
[email protected] | 
https://groups.google.com/d/forum/ruby-talk-google?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"ruby-talk-google" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to