[TCLCORE] Representation vs Debugobj vs Tweezer
by Alexandre Ferrieux other posts by this author
Sep 13 2009 11:19AM messages near this date
Re: [TCLCORE] app server
|
Re: [TCLCORE] Representation vs Debugobj vs Tweezer
Hi,
In a 2009-08-02 commit, Donal added an interesting debugging tool:
::tcl::unsupported::representation
with the comment:
Result string is deliberately a bit obstructive so that people are
not encouraged to
make code that depends on it; it's a debugging tool only!
Of course I'm delighted to get a sharp knife when I can... however I'm
a bit surprised by this, in the light of an earlier discussion on this
list more than one year ago (2008-06-03, subject: "debugobj"),
regarding a similar patch I had proposed
(::tcl::unsupported::debugobj) at
https://sourceforge.net/tracker/index.php?func=detail&aid=1980917&group_id=10894&atid=3108
94
To summarize the differences:
- 'representation' just gives the type name, as a string result in a
trivially parseable English sentence.
- 'debugobj' also gives refcount, along with object and intrep
pointers, on stdout so as to be a bit harder to depend on. Knowing the
refcount can be very helpful to play with the K combinator and various
in-place optimizations, and knowing the pointers helps tracking
duplication at the Tcl_Obj and intrep levels.
At the time of the discussion, the consensus was that (1) all this was
done by Tweezer, why reinvent the wheel, and (2) too sharp a knife.
Why, then, end up with an even sharper knife with less introspective
power ?
-Alex
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Tcl-Core mailing list
Tcl-Core@[...].net
https://lists.sourceforge.net/lists/listinfo/tcl-core
Thread:
Alexandre Ferrieux
Alexandre Ferrieux
Jeff Hobbs
Alexandre Ferrieux
Donal K. Fellows
Alexandre Ferrieux
Jeff Hobbs
Alexandre Ferrieux
Jeff Hobbs
Alexandre Ferrieux
Magentus
Alexandre Ferrieux
|