Are there any plans to implement ruby behavior similar to the CoffeeScript feature of specifying an instance variable name in a method argument list? Like
cl
I think you answered your own question, it does not fit the ruby simplicity philosophy. It would add additional complexity for how parameters are handled in methods and moves the logic for managing variables up into the method parameters. I can see the argument that it makes the code less readable a toss up, but it does strike me as not very verbose.
Some scenarios the @ param would have to contend with:
def initialize( first, last, @scope, @opts = {} )
def search( @query, condition )
def ratchet( @*arg )
Should all of these scenarios be valid? Just the initialize
? The @*arg
seems particularly dicey in my mind. All these rules and exclusions make the Ruby language more complicated. For the benefit of auto instance variables, I do not think it would be worth it.