the current alias_method goes alias_method :new_method, :old_method - exactly as ruby does it.
Personally I always found this to be super confusing (I remember the order of arguments for alias_method by remembering that it is the reverse of what I'd expect). I think it makes more sense to say alias_method :old_method, :new_method - e.g. I alias the old_method to the new_method.
What does everyone think? Happy to do the change if people agree.
A lot of languages allow you to make an alias by using new_method = old_method. Python, JavaScript, and Haskell come to mind. On other hand, the unix command ln does expect its arguments in the order you propose.
I have to look up the order of alias_method and ln every time I use them. I never get new = old mixed up ... but I never get confused by def new_met(*args); old_met(*args); end either, and that's all alias_method does right now in Crystal.
I just removed alias_method. Reasons:
Point 2 is very important: more aliases means more names to learn. Even if you don't use an alias, if somebody on your team or a project you are working on uses it, you'll have to learn it. That means that eventually everyone learns all aliases, and that just occupies space in your mind for no real reason. Let's simplify the language.
Most helpful comment
I just removed
alias_method. Reasons:Point 2 is very important: more aliases means more names to learn. Even if you don't use an alias, if somebody on your team or a project you are working on uses it, you'll have to learn it. That means that eventually everyone learns all aliases, and that just occupies space in your mind for no real reason. Let's simplify the language.