[Top][All Lists]

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

Re: [Emacs-diffs] trunk r113747: lisp/frameset.el: Convert `frameset' to

From: Stefan Monnier
Subject: Re: [Emacs-diffs] trunk r113747: lisp/frameset.el: Convert `frameset' to vector and add new slots.
Date: Wed, 07 Aug 2013 22:46:22 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

>> I know we have some offenders, but please try to stick to "foo-p returns
>> a boolean".
> Why?  It's a CL-style predicate, which returns a "generalized boolean"
> (either nil, or anything else).  What is the harm in returning the
> version?

I don't really care that it doesn't always return t as non-nil value.
But its non-nil value should be treated by its docstring (and by
callers) as a boolean equivalent to t.  Otherwise it's not just
a "predicate" but an accessor.

>> Also, this doesn't just test whether it's a frameset or not (which is
>> what one expects from "frameset-p") but it does some sanity checks
>> as well, something I'd call maybe "frameset-valid-p".
> It needs to be called `frameset-p' for cl-typep to work.

You can use the built-in frameset-p (and then remove the :named
and :type as well, so that the tag becomes internal/hidden, which
I also find cleaner)).

> If you're suggesting that I split the current frameset-p into a
> strict-boolean-returning frameset-p and a more thorough
> frameset-valid-p, I can do that, but, what is the gain?

That's it's more idiomatic?


reply via email to

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