From: Andy Wingo <wingo@pobox.com>
To: Mark H Weaver <mhw@netris.org>
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: guile and elisp
Date: Sat, 27 Mar 2010 17:54:24 +0100 [thread overview]
Message-ID: <m3eij5u2m7.fsf@pobox.com> (raw)
In-Reply-To: <20100327130750.GA9026@fibril.netris.org> (Mark H. Weaver's message of "Sat, 27 Mar 2010 09:07:51 -0400")
Hi Mark,
Thanks for the mail. A couple of brief reactions:
On Sat 27 Mar 2010 14:07, Mark H Weaver <mhw@netris.org> writes:
> I think it's very important that we choose a path which can
> potentially lead to clean semantics somewhere down the road in a
> future guile-emacs universe with finely intermixed scheme and lisp
> code (and other languages for that matter).
Yes. And I would put this even stronger, that if Scheme and Elisp were
mixed now, that our solution should have clean semantics, without the
need to migrate elisp.
> So what is the path to clean semantics that I'd like to make available
> to future generations of guile-emacs? I'd like it to be possible to
> gradually convert instances of nil to either #f or '(), with the goal
> of eventually deprecating nil altogether. We can think of this
> process as "annotating" otherwise ambiguous values, so that non-lisp
> languages know how to treat them. To enable that, we must be able
> convert any instance of nil to #f or '() without breaking existing
> lisp code.
Hm, not sure if I follow; and in any case I'm not sure that modifying
existing Elisp code should really be on the table. But your next point
is interesting:
> The [E]Lisp equality predicates, and the associated hash tables,
> alists, etc, should not distinguish boolean-false and end-of-list (and
> here's the important point) regardless of where the values being
> compared/hashed came from.
Good point, that Scheme's equal? (and assoc, and hash-ref) can treat #f
and nil as distinct, but Elisp's equalp can treat them as equivalent.
Thus we don't introduce any intransitivity into the language.
> In addition, we might want to consider some kind of hacks to
> automatically annotate data in various places. We could provide
> procedures such as "canonicalize-boolean" which converts nil to #f,
> and "canonicalize-list" which converts nil to '() and mutates any nil
> in the CDRs to '().
We could, but I'm not sure I see the need: if Scheme's equal? treats
nil, #f, and '() as distinct, why bother? (As in: what inconsistencies
or problems does this approach create?)
I'm not sure (I keep saying "not sure", and I'm really not :) that
*value* or *identity* is the way to solve this problem. To me the
question is more of *property* -- is this value false, is it equal? to
another, is it a boolean, etc.
Thoughts?
Andy
--
http://wingolog.org/
next prev parent reply other threads:[~2010-03-27 16:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-25 12:22 guile and elisp Andy Wingo
2010-03-27 13:07 ` Mark H Weaver
2010-03-27 16:54 ` Andy Wingo [this message]
2010-03-27 18:01 ` Mark H Weaver
2010-03-28 12:13 ` Andy Wingo
2010-03-29 8:42 ` Ludovic Courtès
2010-03-29 10:43 ` Andy Wingo
2010-03-29 12:01 ` Ludovic Courtès
2010-03-29 18:32 ` Grant Rettke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3eij5u2m7.fsf@pobox.com \
--to=wingo@pobox.com \
--cc=guile-devel@gnu.org \
--cc=mhw@netris.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).