[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] %nil-handling optimization and fixes v1
From: |
Mark H Weaver |
Subject: |
Re: [PATCH] %nil-handling optimization and fixes v1 |
Date: |
Sun, 30 Aug 2009 14:01:44 -0400 |
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