DEV Community

Discussion on: If Ruby’s so Happy, What’s %w(a b c)

Collapse
 
cooljasonmelton profile image
Jason Melton

From what I've read, the main reason they exist is to give more readability and brevity. Seems the point is less commas and quotes. That being said, I've never made a habit of using them.

When I wrote this, I was thinking: more options means better, but in all honesty, I rarely take advantage of a lot of Ruby's alternatives. For example, I've never once used "detect" though I've used "find" a ton.

I tend to stick with what whatever I learn initially unless there's a good reason to change. Rethinking it now, I think I'm back to not liking the shorthand, lol.