tcl and smalltalk

jdporter on 2002-07-10T15:31:16

Believe it or not, reading the perl6 summaries (thanks, pd!) has gotten me to look at other "meta-compiled" languages, in particular, Tcl and Smalltalk.

I have to say, I really like the semantics of Tcl (the source-level language) (though the syntax is perhaps slightly less than ideal), and I really REALLY like the execution semantics of the smalltalk virtual machine. But the syntax of Smalltalk is heinously hideous! I wonder if there are any other languages that have back-ends targeting the smalltalk vm? I almost wish the perl6 guys had considering using the smalltalk vm, at least as a starting point. So much good work has already been done on virtual machines, and I'm not convinced that reading a few papers is enough to allow one to say that he is not reinventing the wheel.


I did look...

Elian on 2002-07-10T16:19:00

Looked at some of the smalltalk engines, as well as some Scheme and Lisp engines. None of them were up to what we needed--they were all 80% there, and getting the rest of the way (both in terms of portability and features) looked to be more trouble than it was worth. Plus the inevitable licensing issues, of which there were more than I cared to think about.

demi-compiled

belg4mit on 2002-07-10T16:37:35

I'd always been led to believe Tcl was a strictly interpreted language, and this was the source of man of the hoops one must go trhough for math, string munging, etc. (It has been a long time since I touched Tcl)

Re:demi-compiled

jdporter on 2002-07-10T20:04:30

I'd always been led to believe Tcl was a strictly interpreted language

And so it was, until version 8.

Now it is a "meta-compiled" (or is it "demi-compiled"?) language, just like Perl and all the rest of these modern high-level dynamic languages. (with perhaps a few exceptions. One that might not be (yes, I ought to go check) is Rebol, considering its progenitor is Forth.)

Re:demi-compiled

Elian on 2002-07-15T17:08:27

Version 1 of REBOL is tokenized and does weird things internally, as it's entirely done in Continuation Passing Style. (Saw a talk by the guy who wrote the code) Version 2 was a complete rewrite of version one, since nobody understands CPS, and I dunno how they do it.

Re:demi-compiled

jdporter on 2002-07-15T17:21:47

Anyway, it's too bad that we can't say more about Rebol, being as it's closed source.

That Hideous Strength

dws on 2002-07-10T17:07:42

But the syntax of Smalltalk is heinously hideous!

Smalltalk has a deceptively simple syntax. After using it for a while, everthing else looks like overkill. Fortunately, overkill in Perl is quite fun.

Re:That Hideous Strength

pdcawley on 2002-07-10T19:24:54

Strange isn't it. The more Smalltalk I read, the more I like the syntax. There's something to be said for a really, really simple syntax...

Re:That Hideous Strength

jdporter on 2002-07-10T20:11:35

Being a Perl citizen, I should be ashamed to use this argument, but... To me, the syntax of smalltalk can be described in two words: ug, lee.

But then, I haven't read much smalltalk. I'm guessing that it's optimized more for writing (e.g. ^ vice return ), so maybe I won't appreciate it until I write something in it.

Anyway, the smalltalk vm is exceptionally well designed, and could easily have compilers for other languages targeted to it. I wonder if any already exist!