From: Lars H. <Lar...@re...> - 2012-09-10 15:02:24
|
Donald G Porter skrev 2012-09-10 16.46: > On 09/10/2012 10:40 AM, Lars Hellström wrote: >> It occurs to me that [namespace import] gives pretty poor support for >> explicitly naming each command to import! > > Yes! > >> Maybe a variant like >> >> namespace importfrom ?-force? $ns ?$cmdname ...? >> >> would make it easier to do The Right Thing here? > > The "-force" option is a misfeature we ought not continue. It exists > to work around a design bug we fixed many releases ago. Just to be clear: Do you mean the right thing is to always overwrite existing commands? > Other than that you appear to have the right idea. > > I would add a "-as" option in order to do importing and renaming in > a single step (without the need to [rename] some existing command > that's in the way). I don't quite see how that would look syntactically, especially when multiple commands are being imported. Please give an example. Also, I could live with falling back to [interp alias] for cases when source and target command names are different. Lars Hellström |