This is the mail archive of the mailing list for the guile project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: TCL->Scheme

(I guess this toping doesn't really related to guile---So Ian,
reply me directly if you feel it's OK)

From: Ian Bicking <>
> Can anyone see possible solutions to the type problem -- i.e., that
> TCL has only one type (strings)?  I think this will be a general
> problem for translated languages, because the type system of one
> language won't translate one-to-one to the type system of Scheme.  If
> it is staticly typed you can munge your way around this, but most
> scripting languages aren't statically typed.

If you really want to write just a "translator" from Tcl to Scheme,
keeping semantics of original program, there's nothing different from
ordinaly compiler problem.

However, I got feeling that what you're looking for is a way to
interoperate Tcl code and Scheme, right?
In that case, I guess you can define some semantics by yourself:
("if it looks like a number, translate it to Scheme number" like that).
STk ( has a nice integration of Tk's
everything-in-string policy and Scheme.  You may want to look at it.

Or I might miss your point.  Could you explain your project further?

> (I don't know how they byte-compile
> TCL -- the language seems practically designed to make it hard to
> compile by convential means).

Why?  Of course Tcl's nasty "dynamic" nature (like consisting variable
names at run-time) makes it difficult to resolve all symbol references
at compile time, but you can still embed an instruction to do symbol
lookup at runtime.

  Square USA Inc.   Honolulu Studio R&D division
#"The most important things are the hardest things to say" --- Stephen King