[Top][All Lists]
[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'.
- Re: truth of %nil, Daniel Kraft, 2009/07/01
- Re: truth of %nil, Mark H Weaver, 2009/07/02
- Re: truth of %nil,
Ludovic Courtès <=
- Re: truth of %nil, Neil Jerram, 2009/07/02
- Re: truth of %nil, Mark H Weaver, 2009/07/03
- Re: truth of %nil, Mark H Weaver, 2009/07/04
- Re: truth of %nil, Andy Wingo, 2009/07/05
- Re: truth of %nil, Mark H Weaver, 2009/07/07
- Re: truth of %nil, Mark H. Weaver, 2009/07/08
- Re: truth of %nil, Neil Jerram, 2009/07/06
- Re: truth of %nil, Mark H Weaver, 2009/07/06
- Re: truth of %nil, Ludovic Courtès, 2009/07/08
- Re: truth of %nil, Andy Wingo, 2009/07/23