Live data from Hacker News

Tcl/Tk 8.6 released (now stackless, w/coroutines, tailcalls, and more)

tcl.tk

1–10 of 42 posts

Re: Tcl/Tk 8.6 released (now stackless, w/coroutines, tailcalls, and more)

#4

that's an impressive set of changes for a minor release! :o) is there a paper that describes the underlying implementation (with the new stackless stuff)?

I don't know of a paper, but on the Tcl wiki there is some discussion of the "non-recursive evaluation" (NRE) engine that enables these features [1]. More formal descriptions of the new coroutine [2] and tailcall [3] commands are listed, among others, here [4].

1. http://wiki.tcl.tk/37253#pagetocbefb5a57

2. http://www.tcl.tk/cgi-bin/tct/tip/328

3. http://www.tcl.tk/cgi-bin/tct/tip/327

4. http://wiki.tcl.tk/21276

Update: more details on the NRE implementation are available here [5] at the contributing author's site; anonymous login required.

5. http://msofer.com:8080/wiki?name=NRE

Re: Tcl/Tk 8.6 released (now stackless, w/coroutines, tailcalls, and more)

#7
The explicit tail calls look pretty neat. All languages should include this, or something like it, I think; tail calls come in handy for all sorts of things. Making it explicit sidesteps complaints about how it will impede debugging, and ensures programmers will definitely get it where they want/expect.

I think this would be a chance to rehabilitate the much-maligned GOTO keyword. But "tailcall" is probably just as good.

Re: Tcl/Tk 8.6 released (now stackless, w/coroutines, tailcalls, and more)

#8
post #3

Is this the programming language that works without a lexer/parser and a grammar? Why aren't there more programming languages written this way? Seems easier to implement.

the point is not so much ease of implementation (a parser for a reasonable grammar is usually an insignificant part of a language implementation) as is homoiconicity, and thus easy extensibility. in this regard tcl is similar to lisp and forth (despite all three having different foundations).

Re: Tcl/Tk 8.6 released (now stackless, w/coroutines, tailcalls, and more)

#10

Tcl Rule 1: Everything is a string. Tcl Rule 2: See rule 1. Tcl Rule 3: Not joking.

While the EIAS philosophy is true in Tcl, at the real guts level, the actuality is "Everything must be representable as a string". EMBRAAS it! There is an object system underneath which handles native or user defined types.
Post reply on HN