On 1/27/2011 12:31 PM, Mark Roseman wrote:
  Terry Reedy<tjre...@udel.edu>  wrote:
Tk itself is purely a gui package -- abstract widgits, geometry placers
to make them visible, and an event system to make them active. But it
does have the baggage of needing tcl included. About a decade ago, some
people had the idea of removing the tcl dependency, but nothing seems to
have come of that. For some people, the tcl baggage is reason enough to
be rid of tk.

Thanks for raising this point.  While I don't want to exhaustively
respond to this, I would like to raise a few important points.

1. The performance issues of having Tk use Tcl are negligible; the bulk
of Tk (code-wise and time-wise) are spent in C.  Tcl itself is also very
fast nowadays, using all the usual techniques that modern dynamic
languages use.
I have the impression that tcl is mostly used in initial setup and 
configuration, as opposed to repetitive drawing to the screen. But I do 
not really know.
2. Some people do have moral/purity objections to including Tcl, and
while I understand where the sentiment comes from, I think there are few
solid engineering reasons for this.
There are two types of objections which have much less force now than a 
decade ago. One is the size issue. A tcl-less tk would presumably be 
smaller and thus add less to the Window distribution. The other is that 
tcl and Python were once seen as competing scripting languages, so why 
promote the competitor? Well, if there really was a contest, Python won.
3. Removing Tcl from Tk makes keeping up with changes in Tk very
difficult.  The Perl people found this out; Perl/Tk extracted Tcl, and
as a result remained using a 10 year old version of Tk because upgrading
would have been too painful.  The newer Perl binding (Tkx) is in fact a
ridiculously thin binding over the Tcl API, and makes keeping up to date
with the newest Tk changes trivial, often requiring no code changes in
the Perl binding.
Good point. Python should (continue to) just use the latest tk from its 
maintainers. If *they* were to decouple it from tcl (unlikely, it 
seems), fine. If not, so be it ;-).
If anyone does have questions, comments or concerns about Python
including a Tcl interpreter to use Tk, I'd be happy to try to explain or
address them.
Thanks for the additional info. We need more of that.

---
Terry Jan Reedy

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to