Updated 2010-11-09 20:04:47 by AK

http://www.smilax.org/99 - "ParentheTcl (pronounced "parenTHETical," abbreviated "p7tcl" or "P7") is a safe language for writing fast, compiled extensions for Tcl."

The language seems to RS a curious mix of Tcl and C - variables are strongly typed, expression syntax in parentheses is part of the language. Vector elements are indexed by parentheses (as in Tcl) or (if already in a parenthesed expression) by square brackets (as in C). Example:
 pproc (uni*)to_lower { (uni*)x } {
    for {set (int)i 0} ($i< [len $x] ) {incr i} {
        if ( 'A' <= $x($i) && $x($i) <= 'Z' ) {
            set x($i) ($x($i) - 'A' + 'a')
    set x

Commands so defined are compiled (to C), and made available as Tcl commands.

Notice that all extensions to Tcl syntax are marked with Parentheses -- thus the name ParentheTcl.

Not sure what to think of this... Experience reports are welcome on this page.

AK Feb 15, 2005: From the description above it sounds as if this wants to be or is already for Tcl what Pyrex is for Python.

(So, if Python has Pyrex, Tcl should have...T-Rex?)

MS Is this comparable in any sense to critcl? - RS: The general direction seems to be the same, but critcl embeds standard C in Tcl, and generates source code to make a DLL from, while P. uses a hybrid language of its own, and seems to require a runtime module (so maybe not compiled to machine code, but some intermediate code) - but that's very much like Tcl itself then, isn't it? >Strick> It would be nice if ParentheTcl used critcl to make itself also an 'on-the-fly' language.

>Strick> I've updated the description on http://smilax.org/99 and I've made my first public release of ParentheTcl, named 0.5.1, available from here: http://albus.yak.net/repos/. Please give it a try.