[Top][All Lists]

[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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]