News for hackers. Stuff that matters.
Re:Tcl Static Prime: experimental compiler for Tcl that prod... by 0xdeadbeefbabe on Tuesday July 28, 2015 @01:39PM (#9963217)
I'm familiar with parts of TCL, but I still can't arrive at a good answer for those questions.

It has a unique (wild and strange) feature called upvar that I haven't seen in python or lua. You "use" it to reference a previous frame in your call stack.

Re:Tcl Static Prime: experimental compiler for Tcl that prod... by davidw on Tuesday July 28, 2015 @01:57PM (#9963326)
You can use upvar and uplevel to write control structures (if, while, that kind of thing) in Tcl itself. For instance, Tcl itself does not have a do ... while loop, but you can write one that will look like it's part of the language.

Also: it's Tcl, by the way, not TCL.

Re:Tcl Static Prime: experimental compiler for Tcl that prod... by beagle3 on Tuesday July 28, 2015 @05:20PM (#9964560)
Lua has something called an "upvalue" but it's a completely different thing.

Lobster[0] also lets you write do/while loops and new conditionals, but does that in a different way that does not require upvar/uplevel, and is IMHO cleaner. (It is less capable in general, but captures 99% of the use cases that I've seen for upvar/uplevel in Tcl)

It is indeed Tcl, but it IS an acronym for "Tool Command Language", or at least started out that way.

[0] http://strlen.com/lobster

Re:Tcl Static Prime: experimental compiler for Tcl that prod... by sigzero on Tuesday July 28, 2015 @05:44PM (#9964712)
The acronym is true but the community uses Tcl now and has for quite a while.
Re:Tcl Static Prime: experimental compiler for Tcl that prod... by amyjess on Tuesday July 28, 2015 @06:05PM (#9964860)
Stuff like this intrigues me, from a linguistic perspective.

I'm really curious what lead to the community settling on this. You'll occasionally see all-lowercase in some projects thanks to the fact that *nix commands are usually all-lowercase, but title-casing an acronym is weird.

If I had to hazard a guess, I'd say it's because "Tcl" is typically pronounced as a word ("tickle"), so it got de-acronymized like "radar" or "scuba". Then again, nobody writes SCSI as Scsi. I'd love to study this some more...

Re:Tcl Static Prime: experimental compiler for Tcl that prod... by davidw on Tuesday July 28, 2015 @06:25PM (#9964974)
My guess: it's kind of a fashion thing. FORTRAN and COBOL and FORTH and whatnot are a bit old fashioned looking.

https://en.wikipedia.org/wiki/Fortran#Naming

Re:Tcl Static Prime: experimental compiler for Tcl that prod... by _ph_ on Tuesday July 28, 2015 @02:10PM (#9963428)
You can actually reference any frame in the stack all the way to the top. And it has a companion "uplevel" which allows you to evaluate code on any of those stack frames. But usually both are used only with the previous stack frame. This allows TCL functions to mostly behave like macros.
Re:Tcl Static Prime: experimental compiler for Tcl that prod... by smrtinsert on Tuesday July 28, 2015 @03:27PM (#9963937)
manipualting stack is exhilarating once you understand it. I learned clojure way after my tcl so now in retrospect I think of it as a macro system - keep it hygenic!