From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel 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 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1375929999 2188 80.91.229.3 (8 Aug 2013 02:46:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 8 Aug 2013 02:46:39 +0000 (UTC) Cc: Emacs developers To: Juanma Barranquero Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 08 04:46:41 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V7GFN-0002LO-Af for ged-emacs-devel@m.gmane.org; Thu, 08 Aug 2013 04:46:41 +0200 Original-Received: from localhost ([::1]:36839 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7GFM-00083U-W2 for ged-emacs-devel@m.gmane.org; Wed, 07 Aug 2013 22:46:41 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48111) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7GFD-00082u-9R for emacs-devel@gnu.org; Wed, 07 Aug 2013 22:46:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V7GF5-0007I8-Ux for emacs-devel@gnu.org; Wed, 07 Aug 2013 22:46:31 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:50202) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7GF5-0007Hw-Ok for emacs-devel@gnu.org; Wed, 07 Aug 2013 22:46:23 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFLd/Nq/2dsb2JhbABEvw4Xc4IeAQEEAVYWCgMFCwsOJhIUGA0kiB4GwS2RCgOkeoFegxM X-IPAS-Result: Av8EABK/CFFLd/Nq/2dsb2JhbABEvw4Xc4IeAQEEAVYWCgMFCwsOJhIUGA0kiB4GwS2RCgOkeoFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="20946127" Original-Received: from 75-119-243-106.dsl.teksavvy.com (HELO ceviche.home) ([75.119.243.106]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 07 Aug 2013 22:46:16 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 0336D66100; Wed, 7 Aug 2013 22:46:22 -0400 (EDT) In-Reply-To: (Juanma Barranquero's message of "Thu, 8 Aug 2013 04:12:51 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:162480 Archived-At: >> 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? Stefan