This is the mail archive of the guile@sourceware.cygnus.com 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]

Translators/source language detection


Just to note, back a while ago I wrote the Tcl->Scheme translator, which
still lives at <http://www.cs.earlham.edu/~bickiia/tcl-scheme>, though I
haven't worked on it for some time due to lack of interest from, well,
nearly anyone else.

But, anyway, I still lurk about and I thought I might share my thoughts
on current round of translator discussion.  I'll send a few emails to
keep the thoughts seperate -- please CC me any replies, as I'm only
subscribed to the digest.

As to source language detection:
I think two methods of detection that came out make sense.  First,
looking for a certain kind of string in the first like, like -*- Python
-*-.  Second, looking at the extension.  The first is necessary when a
piece of software has a hardcoded file location, like
~/.someapp/prefs.scm.  The user should still be able to write this file
in whatever language they desire.  Second, if a translator ever gets
that far, it would be nice to take unmodified source from another
language and load it into Guile, so that (load "somecode.py") would work
cleanly.

Adding something like (load "somecode.py" #:language 'python) would be,
IMHO, bad.  It makes translated languages clearly second-class, and the
difficulties of translating a language are enough to make it
second-class, you don't have to remind people :)  Also, you have to
predict where someone will want to load scheme code, and where they will
substitute translated code.  People will always predict incorrectly.


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