From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] trunk r113747: lisp/frameset.el: Convert `frameset' to vector and add new slots. Date: Thu, 8 Aug 2013 19:47:57 +0200 Message-ID: References: <20fb587c-9b7d-48a1-9112-81c3d301ed9a@default> <8eca9cdf-dbe5-4bdc-b160-b7333b175123@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1375984124 28392 80.91.229.3 (8 Aug 2013 17:48:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 8 Aug 2013 17:48:44 +0000 (UTC) Cc: Stefan Monnier , Emacs developers To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 08 19:48:46 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 1V7UKJ-0006Qx-Bc for ged-emacs-devel@m.gmane.org; Thu, 08 Aug 2013 19:48:43 +0200 Original-Received: from localhost ([::1]:57082 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7UKJ-0000Is-1u for ged-emacs-devel@m.gmane.org; Thu, 08 Aug 2013 13:48:43 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33324) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7UKF-0000Ib-M3 for emacs-devel@gnu.org; Thu, 08 Aug 2013 13:48:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V7UKE-0003PD-CA for emacs-devel@gnu.org; Thu, 08 Aug 2013 13:48:39 -0400 Original-Received: from mail-ea0-x22c.google.com ([2a00:1450:4013:c01::22c]:61861) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7UKE-0003Op-5k for emacs-devel@gnu.org; Thu, 08 Aug 2013 13:48:38 -0400 Original-Received: by mail-ea0-f172.google.com with SMTP id r16so1580686ead.17 for ; Thu, 08 Aug 2013 10:48:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=EYJS4PFfrdFjn4N5EoDQwBLUfJ3TaP9r0dT51Tm2NTM=; b=YqUBHyav1xZOhvFNlX1ZorTfl0OlkObQA2CII3NrorE29LqjTmXxeM8/qX3Ys/OeOc UqZMfpY+t9yM6Go+ilRyfhNbDuGdZWojqca8yBTOwDY0rLHtjYNLHZvA3EB0lgiEZEx3 +2lhHmDEepUeDEcrpcd/zdD2lvlGptXJL87+SqjvouyzNMJRLeJZf0UX//brLrmzXfD2 6e6ZEyd9xo7NjQO1r2bmnl8OxyRRyHz/xbtkgtqO+shOVPQ55VSCcx5iT2MPxEb/ALHg MSKOYVu22jQ3NDhgH6guepFv37ojhsdUwO+EGJQuHt4dH46x5YEsytQctX6TIkp2G3Vx /gmg== X-Received: by 10.14.102.72 with SMTP id c48mr9464923eeg.52.1375984117374; Thu, 08 Aug 2013 10:48:37 -0700 (PDT) Original-Received: by 10.14.133.15 with HTTP; Thu, 8 Aug 2013 10:47:57 -0700 (PDT) In-Reply-To: <8eca9cdf-dbe5-4bdc-b160-b7333b175123@default> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c01::22c 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:162531 Archived-At: On Thu, Aug 8, 2013 at 7:18 PM, Drew Adams wrote: > "Also"? > > Why would we ever want someone to use `frameset-p'? What's the > point of testing only for a possibly invalid structure that > happens to have the right tag? In some context might make sense. For frameset-to-register, for example, the frameset-p check is not to check the frameset's validity, just that it is of the right type, because the frameset was generated under controlled circumstances and cannot be erroneous. If the user has a sudden impulse to do M-: (set-register ?a (make-frameset nil :states 'hawhaw)) C-x r j a s/he will get what s/he asked for. No checking will protect against any erroneous data, after all; all the frameset-valid-p in the world won't protect the user that wants to do (let ((circ '(nil)) (fs (frameset-save nil))) (setcdr circ circ) (setf (frameset-states fs) circ) fs) > Not a rhetorical question. Do we really want people relying > on `frameset-p' (and `cl-typep') to check whether something is > of type frameset? You've been following this conversation and know that my preference would be for a strong-checking frameset-p. Given that it is not going to be so, I can abuse the implementation of cl-typep and teach the users to do (cl-typep FRAMESET 'frameset-valid), which happens to work ;-) J