@Setok Oh really, that sounds cool. I guess writing tests is really the perfect use case for this, it's not a function you'd need to call or type by hand. It can get cumbersome in other use cases
@konstantin can also be used for encapsulation of a sort. At least in #Tcl, procedures (functions) can be created dynamically and with any names. So you could have a procedure that creates a new procedure (even like what you described), and returns the name which you could then set to a variable and use it that way (indeed OO systems tend to do that). Using aliases you could even create a command to do:
newProc hello {Does the usual hello world thing} {
puts “Hello, world”
}