guile-devel
[Top][All Lists]
Advanced

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

Re: truth of %nil


From: Ludovic Courtès
Subject: Re: truth of %nil
Date: Thu, 02 Jul 2009 16:50:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Hi,

Mark H Weaver <address@hidden> writes:

> I've been considering writing a python compiler for guile.  For python
> (and others) there are several values considered to be false, such as
> 0 and various empty collections, and so a different approach will have
> to be taken to this problem.

[...]

> So how about having elisp `if' and `cond' compile not to scheme `if'
> and `cond', but rather to scheme `elisp-if' and `elisp-cond'?  Or
> perhaps compile `(if c a b)' to `(if (elisp-true? c) a b)'.

I concur (but I haven't followed the elisp discussion closely).

Regardless of which approach the elisp front-end takes, this is
something other languages can already do.  This is something the
ECMAScript front-end does: see how `if' is handled in
`language/ecmascript/compile-ghil.scm' and the definition of `->boolean'
in `language/ecmascript/base.scm'.

Thanks,
Ludo'.





reply via email to

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