I have used keyword arguments for some of my methods before, but haven't really thought about why not use it for all methods with arguments?
Seems like there is no good reason to have the caller ever know the correct ordering for the arguments.
If verbosity of the code is the only issue with keyword arguments, is there a good reason to not use keyword arguments for all your methods?
More on keyword arguments from Thoughtbot - https://robots.thoughtbot.com/ruby-2-keyword-arguments
I think its mostly just not taken off due to habit. We've had position arguments and then optional hashes which are pretty much keyword arguments so it's not a big change, but it's definitely a nice one.
It's probably a good habit to start using them where they make sense from now on. I'll probably just keep forgetting to do it though. :)
Join 31,353+ developers who get early access to new screencasts, articles, guides, updates, and more.