GulfOfMexico icon indicating copy to clipboard operation
GulfOfMexico copied to clipboard

[Feature request] Rename keyword

Open SkyaTura opened this issue 1 year ago • 2 comments

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! 

SkyaTura avatar Jun 20 '24 04:06 SkyaTura

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!

ktlknss avatar Aug 22 '24 08:08 ktlknss

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

guigui0246 avatar Aug 29 '24 00:08 guigui0246