guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Guile-commits] GNU Guile branch, string_abstraction2, updated. 823e


From: Andy Wingo
Subject: Re: [Guile-commits] GNU Guile branch, string_abstraction2, updated. 823e444052817ee120d87a3575acb4f767f17475
Date: Wed, 27 May 2009 00:46:22 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux)

Hi Mike,

On Wed 27 May 2009 00:26, Mike Gran <address@hidden> writes:

> If one can't depend on the order of evaluation, the the source encoding
> has to become a pragma that is preprocessed.

One can depend on the order of evaluation, but not of the order of
reading and evaluation.

> The reader could probably preprocess the file looking for where 
> the text "coding: XXXXX" appears within a comment in the top dozen
> lines of a source code file. Or perhaps a line that is explicitly
> ";;;; #pragma coding: XXXXX" in the top few lines of a file.

This sounds almost sane to me. I think python has a standard for this:

   http://www.python.org/dev/peps/pep-0263/

This is complicated in Guile by #!. A reasonable thing would be to have
the reader have a bit on whether it actually saw an expression yet or
not. If not, "^;+ [^\n]*coding: ..." would set the file's encoding.

Andy
-- 
http://wingolog.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]