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]

Re: Translators again


On Sat, Jan 22, 2000 at 11:02:46PM +0000, Neil Jerram wrote:
> Lalo Martins writes:
> 
>    >       Is the ``client'' application responsible to finding out the
>    >       language, or is it Guile (libguile)? [...]
>    > 
>    > This is a detail, IMO.  We can implement any reasonable combination of
>    > -    client specification
>    > -    looking at file extensions
>    > -    simple source code analysis.
> 
>    It's an important detail. Try to design an application that
>    supports translation without knowing this detail and you'll
>    see. :-)
> 
> Sure - sorry, I didn't mean to belittle your point.  I think that it's
> a fundamental problem, but one that we can solve acceptably in
> practice.
> 
>    Still, I think you give the best answer. I'd futher boil it to:
> 
>    1: the client chooses the language, but it can choose ``detect''
> 
>    2: the detector first tries to search for a string in the first
>    few lines (bytes?).
> 
>    3: if that fails, it looks at the filename suffix (extension).
> 
>    4: if even that fails, should it issue an error (exception) or
>       return ``scheme''?
> 
> Sounds good.  In my proposal, you could implement this sort of
> strategy by
> 
>  - defaulting to <autodetect-reader> (rather than
>    <scm-reader>) if no reader class is specified
> 
>  - writing an <autodetect-reader> implementation that performs
>    the steps above and then instantiates the appropriate
>    <LANG-reader> as a proxy to slurp the source file.


Oh. And what about ``eval''? The situation where I want to
execute a string of user input? Remember that Guile is also for
extension :-)


[]s,
                                               |alo
                                               +----
--
      I am Lalo of deB-org. You will be freed.
                 Resistance is futile.

http://www.webcom.com/lalo      mailto:lalo@webcom.com
                 pgp key in the web page

Debian GNU/Linux       ---       http://www.debian.org
Brazil of Darkness   --   http://zope.gf.com.br/BroDar


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