From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Towards a cleaner build: cedet Date: Thu, 13 Jun 2019 12:35:57 -0400 Message-ID: References: <83zhn6zkgf.fsf@gnu.org> <83a7eo9nsh.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="256888"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 13 20:37:56 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hbUbk-0014j5-66 for ged-emacs-devel@m.gmane.org; Thu, 13 Jun 2019 20:37:56 +0200 Original-Received: from localhost ([::1]:43520 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbUbj-00008x-4b for ged-emacs-devel@m.gmane.org; Thu, 13 Jun 2019 14:37:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52732) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbSho-0008N2-OU for emacs-devel@gnu.org; Thu, 13 Jun 2019 12:36:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbShn-0002C5-Kt for emacs-devel@gnu.org; Thu, 13 Jun 2019 12:36:04 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:46553) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hbShn-00026h-D6 for emacs-devel@gnu.org; Thu, 13 Jun 2019 12:36:03 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 45A5710095E for ; Thu, 13 Jun 2019 12:36:01 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 28D2B100932 for ; Thu, 13 Jun 2019 12:36:00 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1560443760; bh=dfuRDHAAMF0fAnoPwIOB6gr1v2RsgKRKrqDn7WmrN3U=; h=From:To:Subject:References:Date:In-Reply-To:From; b=GeBtM8ipLeGishQNdmzbIVTkl5rcyDgN4ybjgVy/AsE5IdC/cZjMoY0T7RrTs+6cj BXA+8yHgTjgG2gV2iXIcLVC7rjvgYYvG/Wu+V8GJfF1UK1+QRFfZoytU29DZ19zZE2 N6HoLHMXwYgwCgzVsewapt6prDYqeo99eBYAa5S4DCKDTZZ7biGowVbearm5PVuwEP d6SHDSkoni/u0juCWsO3dp1bQebiZltyAlvJxxFCiefv24/w6BTlY67Mb7i77f33eG eIZ47biiY7QucH51mBIWKjGZ7mnBepQCsZiYL0yP4Tg6pcoqixxK+9VoNQM6i/r5L2 omTFCNiOMV/Ww== Original-Received: from alfajor (cm-84.215.66.78.getinternet.no [84.215.66.78]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id B1284120ABF for ; Thu, 13 Jun 2019 12:35:59 -0400 (EDT) In-Reply-To: (Lars Ingebrigtsen's message of "Thu, 13 Jun 2019 03:38:49 +0200") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:237540 Archived-At: > cedet/ede/config.el:388:5:Warning: Unknown slot `:c-preprocessor-table' [...] > Oh! Those are without colons? Is that the entire issue here, that the > check is strict about colons/not colons and the rest of cedet doesn't > care? Here's the story: - in CLOS, you can access slots with `slot-value` where you specify the slot-name (typically a non-keyword symbol). - in CLOS, `defclass` can specify for each slot an "initializer" keyword, which is the keyword to pass to `make-instance` to provide an initial value for that slot. Typically, this initializer keyword is the slot name with a leading ":". - when Eric wrote EIEIO, he made his version of `slot-value` accept the use of the initializer keyword as an alias for the slot-name. [ In theory, this indirection gives you a bit of extra flexibility since a given initializer keyword can be mapped to different slot-names in different classes, but I've never seen any code take advantage of that nor can I easily imagine a use-case where this would come in handy. ] - in CEDET a lot of the code uses the initializer keyword rather than the slot-name for some reason (I assume Eric started it and the rest followed). AFAICT most people don't really understand the difference between initializer keyword and slot-name in EIEIO for that reason. - Using the initializer keyword rather than the slot name is actually marginally slower. I'd like to deprecate this "feature" of EIEIO which just makes things (marginally) slower and makes EIEIO unnecessarily different from CLOS. So the warning only checks if the slot-name provided to `slot-value` is known, and doesn't try to accommodate initializer keywords since I think that should be deprecated. So for 99% of those warnings, the fix is to remove the leading `:` (or to replace it with a quote, depending on whether it's passed to a function like `slot-value` or to a macro like `oref`). Stefan