This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: translators to guile
- To: Jim Blandy <jimb at red-bean dot com>
- Subject: Re: translators to guile
- From: forcer <forcer at forcix dot burse dot uni-hamburg dot de>
- Date: 07 Oct 1999 05:00:38 +0200
- Cc: Mark NG <ng at snipsnap dot edfac dot unimelb dot edu dot au>,Ian Bicking <ian at earlham dot edu>, guile at sourceware dot cygnus dot com
- References: <19990930010402.A12308@snipsnap.edfac.unimelb.edu.au> <m3aepwjetd.fsf@savonarola.red-bean.com>
Jim Blandy <jimb@red-bean.com> writes:
> > I am wondering what language translators for guile are current out there
> > and where I can get hold of them.
>
> Actually, I take that back. Ian Bicking <ian@earlham.edu> was working
> on a Tcl translator. I don't know its current status. I'd be curious
> to hear.
It works quite well and understands (almost) all of Tcl (which is
quite an achievement)
One thing that is bothering me - and which will bother us all in
the future - is that they introduce a different "world". The Tcl
world in Ian's Tcl translator. To use Scheme functions, you have
to import them to the Tcl world. This is because Tcl does
auto-conversation of types - theoretically everything's a string
and is converted to whatever is needed at the moment.
In an ideal world, one could just use a Scheme function from the
Tcl world. But this doesn't work even for simple functions
because the Tcl interpreter can't know the type of the parameters
nor the return value of the called function, so the user has to
declare those.
It would be very helpful to have a database of function
"prototypes" for the Scheme functions. Though this is uncommon in
Scheme, it would help alot for all authors of language
readers. Most of the other "simple" languages out there do auto
type conversion.
We could at least add most of the primitive function into that
database, so it can be used automagically by the language reading
software. E.g. an entry like
'(string-ci=? (string string) boolean)
Might be read out by the Tcl reader module to add a string-ci=?
function which takes two arguments - strings - and returns a
boolean.
This would move the job of type-declaring functions for different
language modules to the guile core, which is an improvement
imho.
Just my few cents,
-forcer
--
((email . "forcer@mindless.com") (www . "http://forcix.cx/")
(irc . "forcer@#StarWars (IRCnet)") (gpg . "/other/forcer.gpg"))