Re: Goodbye TCL

From: Mark Harrison (mh_at_dreadnok.pixar.com)
Date: 04/24/04


Date: Fri, 23 Apr 2004 22:19:04 GMT

Kevin Kenny <kennykb@acm.org> wrote:
> Please correct me if I've misunderstood. My biggest takeaway from
> your message is that you found that Python's object-orientation
> enabled its extension writers to produce a framework that was
> easily adapted to your needs.

This is also my takeaway from dealing with some other people
who have switched to python. A standard object model which
is difficult to deviate from means that a group of people
will have a much better chance of "just getting it right".

And the facts that

1. it's easy to make a standardized component
2. it's easy to use a standardized component
3. a large standard library is viewed as a positive thing

make it a natural breeding ground for building up a large base
of functionality.

> That advantage is also a grievous disadvantage, however, in that
> it makes it impossible to experiment with different models
> for object-oriented programming.

On this, I'm not so sure... Tcl as a vehicle for language
experimentation is less valuable to most people (imho)
that use Tcl as a tool for doing "real work".

> It's a tough call, and I think that we may well have fallen off
> that particular tightrope. Perhaps in retrospect, "pick an
> O-O technology, however flawed, and go with it" would have
> been a better choice. Here, even my hindsight isn't 20/20!

No, you are spot-on regarding this. Tcl left a
hole in its offering that the pythoneers did a good job in
filling.

> I'm curious about your assertion that namespaces in Python
> "just happen"; in what way do they not "just happen" in Tcl?
> I ask because the internals of namespaces are in considerable
> disarray, and several of us are thinking seriously about changes
> to the resolution mechanism. If there's a fundamental issue
> that can be fixed readily, perhaps we can do something.

Namespaces "just happen" because there's not any easily
accessible way to manipulate them. If you put a function "zz"
into foo.py, the only way it can be gotten to is
by "import foo" and "foo.zz()". The important decisions
are made by the interpreter, so no programmer has the
option of getting it "wrong".

$ cat foo.py
def zz():
    print 'zz'

$ cat foo2.py
import foo
foo.zz()

$ cat foo3.py
from foo import zz
zz()

Note that there's no equivalent of [source].

Cheers,
Mark

-- 
Mark Harrison
Pixar Animation Studios