From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: (:named nil) in cl-defstruct Date: Wed, 15 Mar 2017 16:28:34 -0400 Message-ID: References: <20170313220335.GA5098@acm> <20170314201414.GA4562@acm> <8660jaz9lr.fsf@molnjunk.nocrew.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1489609867 17666 195.159.176.226 (15 Mar 2017 20:31:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 15 Mar 2017 20:31:07 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 15 21:31:03 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1coFZU-0003me-F8 for ged-emacs-devel@m.gmane.org; Wed, 15 Mar 2017 21:31:00 +0100 Original-Received: from localhost ([::1]:39391 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1coFZY-0000fm-To for ged-emacs-devel@m.gmane.org; Wed, 15 Mar 2017 16:31:04 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33479) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1coFYw-0000fc-IY for emacs-devel@gnu.org; Wed, 15 Mar 2017 16:30:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1coFYs-0001sU-LY for emacs-devel@gnu.org; Wed, 15 Mar 2017 16:30:26 -0400 Original-Received: from [195.159.176.226] (port=39098 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1coFYs-0001rM-Ec for emacs-devel@gnu.org; Wed, 15 Mar 2017 16:30:22 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1coFYa-00077k-SL for emacs-devel@gnu.org; Wed, 15 Mar 2017 21:30:04 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 17 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:ko+yKJAlSag53WUExDvxd9nSYmY= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:213056 Archived-At: >> 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