all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juanma Barranquero <lekktu@gmail.com>
To: Drew Adams <drew.adams@oracle.com>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>,
	Emacs developers <emacs-devel@gnu.org>
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	[thread overview]
Message-ID: <CAAeL0SSQhKDAHjiZbcZxcbrG0sRWk072v6RN52NOLbZua_dMRA@mail.gmail.com> (raw)
In-Reply-To: <8eca9cdf-dbe5-4bdc-b160-b7333b175123@default>

On Thu, Aug 8, 2013 at 7:18 PM, Drew Adams <drew.adams@oracle.com> 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)) <RET>
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



  parent reply	other threads:[~2013-08-08 17:47 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1V7CcV-0008Ec-F2@vcs.savannah.gnu.org>
2013-08-08  1:56 ` [Emacs-diffs] trunk r113747: lisp/frameset.el: Convert `frameset' to vector and add new slots Stefan Monnier
2013-08-08  2:12   ` Juanma Barranquero
2013-08-08  2:46     ` Stefan Monnier
2013-08-08  3:17       ` Juanma Barranquero
2013-08-08  4:06         ` Drew Adams
2013-08-08  4:09         ` Stefan Monnier
2013-08-08 10:04           ` Juanma Barranquero
2013-08-08 13:03             ` Juanma Barranquero
2013-08-08 13:18             ` Stefan Monnier
2013-08-08 13:43               ` Juanma Barranquero
2013-08-08 14:40                 ` Stefan Monnier
2013-08-08 15:34                   ` Juanma Barranquero
2013-08-08 16:32                     ` Stefan Monnier
2013-08-08 17:00                       ` Juanma Barranquero
2013-08-08 17:28                         ` Stefan Monnier
2013-08-08 16:50                     ` Drew Adams
2013-08-08 16:51                       ` Juanma Barranquero
2013-08-08 17:18                         ` Drew Adams
2013-08-08 17:32                           ` Stefan Monnier
2013-08-08 17:47                           ` Juanma Barranquero [this message]
2013-08-08 17:51                             ` Juanma Barranquero
2013-08-08 16:32                   ` Juanma Barranquero
2013-08-08 17:30                     ` Stefan Monnier
2013-08-08 17:34                       ` Juanma Barranquero
2013-08-08 18:22                         ` Stefan Monnier
2013-08-09  0:38                           ` Juanma Barranquero
2013-08-08 16:37               ` Drew Adams
2013-08-08  4:05       ` Drew Adams
2013-08-08 15:42     ` Richard Stallman
2013-08-08 15:49       ` Juanma Barranquero

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAAeL0SSQhKDAHjiZbcZxcbrG0sRWk072v6RN52NOLbZua_dMRA@mail.gmail.com \
    --to=lekktu@gmail.com \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.