[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (:named nil) in cl-defstruct
From: |
Stefan Monnier |
Subject: |
Re: (:named nil) in cl-defstruct |
Date: |
Wed, 15 Mar 2017 16:28:34 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
>> 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
- Re: new `obarray` type, (continued)
- Re: new `obarray` type, Eli Zaretskii, 2017/03/13
- Re: new `obarray` type, Alan Mackenzie, 2017/03/13
- Re: new `obarray` type, Herring, Davis, 2017/03/13
- Re: new `obarray` type, Stefan Monnier, 2017/03/14
- Re: new `obarray` type, Alan Mackenzie, 2017/03/14
- Re: new `obarray` type, Stefan Monnier, 2017/03/15
- Re: new `obarray` type, Lars Brinkhoff, 2017/03/15
- (:named nil) in cl-defstruct (was: new `obarray` type), Stefan Monnier, 2017/03/15
- Re: (:named nil) in cl-defstruct (was: new `obarray` type), Noam Postavsky, 2017/03/15
- Re: (:named nil) in cl-defstruct,
Stefan Monnier <=