all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Re: (:named nil) in cl-defstruct
Date: Wed, 15 Mar 2017 16:28:34 -0400	[thread overview]
Message-ID: <jwvd1dip9om.fsf-monnier+gmane.emacs.devel@gnu.org> (raw)
In-Reply-To: CAM-tV--N0=wdE1oBgRySm-cB7hTuKkbj5d7Cq7rndb1sZsOHFQ@mail.gmail.com

>> Common-Lisp doesn't allow (:named ...), but cl-macs.el treats it
>> as :named hence the confusion.  I think we should change this to either
>> disallow (:named ...) or to treat (:named nil) as a way to say "*not*
>> named".  The patch below does latter.  Any objection?

>> -              (setq named t))
>> +              (setq named (if args (car args) t)))

> Hmm, if I read the code below correctly, this would allow (:named
> something-else), but the struct wouldn't be named 'something-else'.
> Which still seems potentially confusing for users.

I think it's OK: it says ":named" not ":name", so it naturally expects
a boolean.  And it's definitely no worse than what we have now.


        Stefan




  reply	other threads:[~2017-03-15 20:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-13  1:36 new `obarray` type Stefan Monnier
2017-03-13 15:49 ` Eli Zaretskii
2017-03-13 17:22   ` Stefan Monnier
2017-03-13 22:03 ` Alan Mackenzie
2017-03-14  1:46   ` Herring, Davis
2017-03-14 12:52   ` Stefan Monnier
2017-03-14 20:14     ` Alan Mackenzie
2017-03-15 17:25       ` Stefan Monnier
2017-03-15 18:19         ` Lars Brinkhoff
2017-03-15 19:24           ` (:named nil) in cl-defstruct (was: new `obarray` type) Stefan Monnier
2017-03-15 19:39             ` Noam Postavsky
2017-03-15 20:28               ` Stefan Monnier [this message]
2017-07-23 14:03         ` Converting CC Mode's obarrays to hash tables. [Was: new `obarray` type] Alan Mackenzie
2017-07-24 14:06           ` Stefan Monnier

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=jwvd1dip9om.fsf-monnier+gmane.emacs.devel@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    /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.