From: Kevin K. <kk...@ny...> - 2012-08-23 17:57:54
|
On 08/23/2012 10:47 AM, Trevor Davel (Twylite) wrote: > Hi, > > On 2012/08/23 03:52 PM, Kevin Kenny wrote: >>>> TclOO, Snack, Snit and XOTcl all use '$d destroy'. Itcl uses 'delete >>>> $d' iirc; Tk uses 'destroy $w'. _Please_ follow the TclOO convention >>>> '$d destroy' so that we don't introduce yet another way to destroy an >>>> object-like thing. >> Huh? 'destroy' isn't a predefined method in TclOO, the last time >> I checked. People choose various aliases to invoke object destruction: >> the universal syntax is [rename $object {}], but destroy, delete, and >> close are all popular names. ([rename] is ugly.) > It really is: http://www.tcl.tk/man/tcl8.6/TclCmd/object.htm. And as > pointed 'destroy' out it's also standard in Itcl, XOtcl, Snit, Snack, etc. > > In Tcllib most things that create commands use 'destroy' to destroy them > (the data structures, many networking protocols, grammar). Stoop, > logger and a few other Tcllib packages use 'delete'. > > Can you provide an example of an existing command/ensemble/object that > is destroyed by '$cmd close' ? Oops. I was mistaken. I plead distraction and undercaffeination. TDBC admits [$connection close] as a synonym for [$connection destroy]. K |