This is the mail archive of the
guile@sources.redhat.com
mailing list for the Guile project.
Re: Scheme as an abstract syntax tree.
Jonathan Bartlett <johnnyb@wolfram.com> writes:
> I think the idea is that Scheme lists are a great representation of
> abstract syntax trees. The reason why scheme is such a great language is
> that it's code is the same as its data. So, you just have to have a parse
> tree + some scheme special forms, and the scheme interpreter itself can
> evaluate the code.
There's a practical problem with this. As i understand it, it
should be possible after loading a module with
(define (foo a) (+ a 1))
to do
puts [foo [expr 1+1]]
This does not really work this way, because in Tcl, everything's
a string. foo will get "1" (string) as argument, and complain.
In the Tcl->scheme i have seen, you have to "import"
scheme-functions to use them, but that's not really something
you'd like to torture the end-user with, nor with putting the
idea of types into a language like Tcl (or perl, if that'll ever
be done).
So, languages with auto-type-conversion pose a bigger problem
than "just" converting them to a parse-tree and providing macros
and functions.
Also, there still is no "official" interface/API for the
translators. This was discussed before, though, and if i
remember correctly it was decided to decide on this after the new
module system is in place which will be after the
first-class-environments will be in place, which will be RSN. :]
-- forcer
--
((email . "forcer@mindless.com") (www . "http://forcix.cx/")
(irc . "forcer@#StarWars (IRCnet)") (gpg . "/other/forcer.gpg"))