
Design patterns in Tcl - blacksqr
https://github.com/level44/design-patterns-in-tcl
======
bluesmoon
Reminds me of work I did at Yahoo a long time ago that eventually resulted in
publishing basic programming patterns in sed:
[http://tech.bluesmoon.info/2008/09/programming-patterns-
in-s...](http://tech.bluesmoon.info/2008/09/programming-patterns-in-sed.html)

~~~
geoelectric
This is pretty cool! I'm glad you shared it. I still drop into sed every once
in awhile and will keep this around.

------
smrtinsert
I miss you Tcl. Upvar, uplevel, how's it hanging guys? While this is a neat
little repo, this is totally unnecessary in Tcl. Being a much more flexible
language than a C++ inspired OO, it had its own idioms that were much more
succinct.

~~~
haolez
Tcl is awesome. It's like Python having a baby with bash, and the baby is
actually pretty :D

For me, it's one of those languages that change your way of thinking about
programming and you will take that with you, no matter what language you will
be working on.

~~~
monetus
IIRC, the TCL interpreter is included in the python one. The baby analogy is
pretty apt, just backwards.

~~~
andrewshadura
No, it’s not. But it comes with Tkinter, since Tk is a Tcl extension.

~~~
bch
It is actually. Tkinter is the python interface to embedded Tk, which
necessarily includes Tcl.

Larry Wall once quipped “Tcl tends to get ported to weird places like
routers”. If only he knew...

Ref: [https://stackoverflow.com/questions/16439936/how-to-call-
tcl...](https://stackoverflow.com/questions/16439936/how-to-call-tcl-
procedure-using-python#16440585)

~~~
nrclark
note on this - Tkinter does come with a TCL interpreter for sure. But not all
Pythons come with Tkinter (source: I've packaged Python for embedded systems)

~~~
bch
Ahhh... I think we were talking past each other a bit above, but your comment
above is clear, and probabaly what everybody in the thread really meant...

------
na85
I learned tcl because it was "that thing you had to learn to script an
eggdrop" back in the bad good old days of IRC.

I find the syntax particularly obtuse and unwieldy. Most other code I've
written I can open up after a few years and more or less pick up where I left
off. But I feel like I have to relearn tcl every time because the syntax is so
dense.

But I still think it's an awesome toy language.

------
makecheck
Tcl is a great example of a language that should have fixed literally a couple
of bad design decisions early on to be sensible. Instead, it is a complete
nightmare to debug. I refuse to allow its use on any project.

One great example is how a variable _name_ can be expected yet its _value_ is
extracted instead, and _seem to function sort of_. Yet it’s stomping through
your code base and messing with values you didn’t think it would. Finding this
is simply not worth the trouble when arguably dozens of other languages would
not even have the problem.

Or, the “error on line 1” where the “line” is a massive nest of loops and
other statements. Tcl (at least at one point, supposedly this improved)
couldn’t offer any more help. And again, this was a completely unnecessary
debugging headache that no other language would have.

