GulfOfMexico
GulfOfMexico copied to clipboard
[Feature request] Rename keyword
Inspired by #649, rename would be a great addition to the language:
rename function definefunction
defunct foo() {
print bar!
}
foo()! // bar
rename foo baz
foo()! // error
baz()! // bar
delete rename!
Also there should be some sort of "duplicate and rename" to keep the old and the new. Also an undo to the rename, in case the Junior renamed something badly and you can't find where he renamed it, just unname!
rename a b is the same as var var a = b! delete b!
and to keep the old one you just don't delete b and that's it