delete(3itcl)

πŸ“¦
version 4.3.8 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– delete β€” bestie, we're clearing the whole vibe out πŸ’…

okay so this is delete(3itcl) from the [incr Tcl] manual, and it is literally the "yeet it into the void" command. let's get into it 🫢


✨ NAME ✨

itcl::delete β€” delete things in the interpreter πŸ—‘οΈβœ¨


🌸 SYNOPSIS 🌸

itcl::delete option ?arg arg ...?

πŸ¦‹ DESCRIPTION πŸ¦‹

so the delete command is how you delete things in the interpreter. it's giving very main character energy because it's implemented as an ensemble β€” which means extensions can slide in, add their own options, and extend the behavior of this command. by default tho? the delete command handles the destruction of namespaces. no cap πŸ’€

the option argument decides what action actually gets carried out by the command. the legal options (and yes bestie, they may be abbreviated) are:


πŸ‘‘ OPTIONS πŸ‘‘

  • delete class name ?name...? β€” deletes one or more [incr Tcl] classes called name. and the way that this works is it deletes all objects in the class, AND all derived classes as well. it's giving full send πŸ”₯
⚠️ heads up bestie: if an error is encountered while destructing an object, it will prevent the destruction of the class and any remaining objects. to destroy the entire class without regard for errors, use the "delete namespace" command. periodt.
  • delete object name ?name...? β€” deletes one or more [incr Tcl] objects called name. an object gets deleted by invoking all destructors in its class hierarchy, in order from most- to least-specific. if all destructors are successful, the data associated with the object is deleted and the name is removed as a command from the interpreter. slay πŸ’…

if the access command for an object resides in another namespace, then its qualified name can be used:

itcl::delete object foo::bar::x
⚠️ and if an error is encountered while destructing an object, the delete command is aborted and the object remains alive 😭. to destroy an object without regard for errors, use the "rename" command to destroy the object access command. (iykyk)
  • delete namespace name ?name...? β€” deletes one or more namespaces called name. this deletes all commands and variables in the namespace, and deletes all child namespaces as well. and when a namespace is deleted, it is automatically removed from the import lists of all other namespaces. it's giving spring cleaning 🧚🌸

πŸ”‘ KEYWORDS πŸ”‘

namespace, proc, variable, ensemble


and that's the whole page bestie, you ate that πŸ’–βœ¨

this was itcl version 3.0, page delete(3itcl) β€” catch you in the group chat πŸ«ΆπŸŽ€πŸ¦‹

πŸ“¦ where this page comes from