unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: Andy Wingo <wingo@pobox.com>
Cc: guile-devel@gnu.org
Subject: Re: [PATCH] %nil-handling optimization and fixes v1
Date: Sun, 30 Aug 2009 14:01:44 -0400	[thread overview]
Message-ID: <20090830180143.GA2484@fibril.netris.org> (raw)
In-Reply-To: <m3ws5zf5bz.fsf@pobox.com>

I wrote:
> > I added the following macros, whose names explicitly state how %nil
> > should be handled.  See the comments in the patch for more information
> > about these.
> >
> >   scm_is_false_assume_not_lisp_nil  scm_is_true_assume_not_lisp_nil
> >   scm_is_false_and_not_lisp_nil     scm_is_true_or_lisp_nil
> >   scm_is_false_or_lisp_nil          scm_is_true_and_not_lisp_nil
> >
> >   scm_is_lisp_false                 scm_is_lisp_true
> >
> >   scm_is_null_assume_not_lisp_nil
> >   scm_is_null_and_not_lisp_nil
> >   scm_is_null_or_lisp_nil
> >
> >   scm_is_bool_and_not_lisp_nil
> >   scm_is_bool_or_lisp_nil

Andy wrote:
> These are terrible names. But they seem to be the best names for the
> concepts we're trying to express. I don't understand all of them yet,
> will wait for a review -- unless Neil takes care of that before I do ;-)

I agree that the names are uncomfortably long.  We could shorten them
without much loss of clarity by replacing "lisp_nil" with "nil" and
"and_not" with "not", yielding:

  scm_is_false_assume_not_nil  scm_is_true_assume_not_nil
  scm_is_false_not_nil         scm_is_true_or_nil
  scm_is_false_or_nil          scm_is_true_not_nil

  scm_is_lisp_false            scm_is_lisp_true

  scm_is_null_assume_not_nil
  scm_is_null_not_nil
  scm_is_null_or_nil

  scm_is_bool_not_nil
  scm_is_bool_or_nil

I can still do this if y'all would prefer the shorter names.  However,
if we've all agreed that scm_is_null/false/true will treat %nil as
both false and null (have we?), the longer names will rarely be
needed.

Are there any remaining objections to mapping scm_is_false/true/null
as follows?

  scm_is_null   -->  scm_is_null_or_lisp_nil
  scm_is_false  -->  scm_is_false_or_lisp_nil
  scm_is_true   -->  scm_is_true_and_not_lisp_nil

      Mark




  parent reply	other threads:[~2009-08-30 18:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-09 16:11 [PATCH] %nil-handling optimization and fixes v1 Mark H Weaver
2009-07-23 21:38 ` Andy Wingo
2009-07-30 22:05   ` Neil Jerram
2009-08-30  9:18   ` Neil Jerram
2009-08-30 18:01   ` Mark H Weaver [this message]
2009-09-01 22:09     ` Neil Jerram
2009-09-02 16:00       ` Mark H Weaver
2009-08-28  7:08 ` Neil Jerram
2009-08-28  7:11   ` Neil Jerram
2009-08-28  7:08 ` Neil Jerram
2009-08-30 13:58   ` Neil Jerram

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=20090830180143.GA2484@fibril.netris.org \
    --to=mhw@netris.org \
    --cc=guile-devel@gnu.org \
    --cc=wingo@pobox.com \
    /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).