guile-devel
[Top][All Lists]
Advanced

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

Re: our nil story


From: Ludovic Courtès
Subject: Re: our nil story
Date: Fri, 16 Apr 2010 14:12:04 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Hi!

Andy Wingo <address@hidden> writes:

> Just updated some docs on other languages and nil. It's in master, but
> I'm pasting here for comments.

Cool!

>     0.1 Support for Other Languages
>     ===============================
>
>     In addition to Scheme, a user may write a Guile program in an increasing
>     number of other languages. Currently supported languages include Emacs
>     Lisp and ECMAScript.
>
>        Guile is still fundamentally a Scheme, but it tries to support a wide
>     variety of language building-blocks, so that a user can implement other
>     languages on top of Guile.

... and so that users can write or extend applications in languages
other than Scheme, too.

>        The easiest way to deal with syntax-heavy language is with files, via
>     `compile-file' and friends. However it is possible to invoke a
>     language's reader on a port, and then compile the resulting expression
>     (which is a datum at that point). For more information, *Note
>     Compilation::.

Perhaps mention ‘read-and-compile’?

>        On a low level, the bit representations for `#f', `#t', `nil', and
>     `'()' are made in such a way that the differ by only one bit, and so a

Typo: “that _they_ differ”.

>        Both of these examples are correct standard Scheme, but, depending on
>     what they really want to do, they are not correct Guile Scheme.
>     Correctly written, they would test the _properties_ of falsehood or
>     nullity, not the individual members of that set. That is to say, they
>     should use `not' or `null?' to test for falsehood or nullity, not `eq?'
>     or `memv' or the like.

Excellent!  I think the examples and explanations in this section make
it perfectly clear how things interoperate and what the pitfalls are.

>        Guile can warn when compiling code that has equality comparisons with
>     `#f', `'()', or `nil'. *Note Compilation::, for details.

Hmm, not yet, right?  :-)

>     0.1.2.3 Dynamic Binding
>     .......................

@xref{Fluids}?

>     0.1.3 ECMAScript
>     ----------------
>
>     ECMAScript was not the first non-Schemey language implemented by Guile,

@url{http://.../the-spec.html, ECMAScript} maybe.

>     but it was the first implemented for Guile's bytecode compiler. The goal
>     was to support ECMAScript version 3.1, a relatively small language, but
>     the implementor was completely irresponsible and got distracted by other
>     things before finishing the standard library, and even some bits of the
>     syntax. So, ECMAScript does deserve a mention in the manual, but it
>     doesn't deserve an endorsement until its implementation is completed,
>     perhaps by some more responsible hacker.
>
>        In the meantime, the charitable user might investigate such
>     invocations as `,L ecmascript' and `cat
>     test-suite/tests/ecmascript.test'.

Heh heh.  What’s your take on ES support for 2.0?

Mine is that “we” should make the basics work, as they used to back when
you implemented it, and fill in ecmascript.test.  IOW, nothing fancy,
but just basic compilation.

Thanks!

Ludo’.





reply via email to

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