From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Engster Newsgroups: gmane.emacs.devel Subject: Re: Shrinking EIEIO objects Date: Fri, 02 Jan 2015 12:22:17 +0100 Message-ID: <87h9w9whp2.fsf@engster.org> References: <54A6053B.5060001@siege-engine.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1420197766 10953 80.91.229.3 (2 Jan 2015 11:22:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 2 Jan 2015 11:22:46 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: Eric Ludlam Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 02 12:22:40 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Y70JT-0001Jh-58 for ged-emacs-devel@m.gmane.org; Fri, 02 Jan 2015 12:22:39 +0100 Original-Received: from localhost ([::1]:50854 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y70JS-0006z4-HD for ged-emacs-devel@m.gmane.org; Fri, 02 Jan 2015 06:22:38 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55929) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y70JP-0006yn-GZ for emacs-devel@gnu.org; Fri, 02 Jan 2015 06:22:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y70JM-0004LO-BM for emacs-devel@gnu.org; Fri, 02 Jan 2015 06:22:35 -0500 Original-Received: from randomsample.de ([5.45.97.173]:33031) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y70JM-0004Jn-3Y for emacs-devel@gnu.org; Fri, 02 Jan 2015 06:22:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomsample.de; s=a; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From; bh=KwBTxOuNyvOccJOBTpLX5pUKhP+wymUogI6jcmxJTSs=; b=ZbbJCa6osgDN9Ok4n9rk7oPST1r4P4NwW3iBE0LD/TDZOwEqbedEkikVRGDS9dFbtvHroM1GxCRe6fvngjWdf66cV/Q3zSjwC8kxpSOpuRof2AM8njqy9W5QimkOW28c; Original-Received: from ip4d154cb9.dynamic.kabel-deutschland.de ([77.21.76.185] helo=spaten) by randomsample.de with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1Y70JD-0006dE-El; Fri, 02 Jan 2015 12:22:23 +0100 In-Reply-To: <54A6053B.5060001@siege-engine.com> (Eric Ludlam's message of "Thu, 01 Jan 2015 21:40:59 -0500") User-Agent: Gnus/5.13001 (Ma Gnus v0.10) Emacs/24.3.91 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 5.45.97.173 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:180920 Archived-At: Eric Ludlam writes: > On 12/30/2014 12:59 PM, Stefan Monnier wrote: >> Hi Eric, >> >> I'd like to install something like the patch below into Emacs's master. >> What it does (along with various other side changes) is shorten the >> object header from 3 fields (the constant `object', the class name, and >> an object "name" field) to just one (an interned symbol with an "eieio-" >> prefix, referring to the class object). > > This seems like a fine idea. A side effect is that the 'name' slot is > gone. There have received a questions about why there is a 'name' for > objects, and really the main thing was debugging. When you have piles > of objects around, naming them makes it much easier to see what is > going on. EIEIO objects have a short hand using a # > format, and when the various prin1 tools are enabled for edebug, that > short hand is used in place of the vector. This is critical when > debugging semantic databases where the vectors contain thousands of > symbols. > > Your proposed solution will enable the current source forge hosted > version of CEDET to keep going, just with warning messages, which > seems fine. > > I can convert the sourceforge version CEDET to use make-instance > instead, which should be compatible before and after your change. I'm a bit confused. Why would we need to change how we construct our objects? Most of these changes seem to be purely internal. The only API change I see (aside from the added eieio-- prefixes) is that NAME is now optional (but not obsolete), which is certainly a good thing. > While reading through the patch, there was a bunch of changes related > to doc strings and methods. The goal was if you used help on a > method, such as: > > C-h f constructor RET > > (or eieio-constructor in your patch) > > it should list the core doc (generic) and doc for every class that has > it's own implementation and custom doc. I couldn't intuit from the > patch what might happen as some of the doc strings looked like they > were removed? I don't think that has changed. I just tried Emacs with the patch and I see the "EIEIO-enhanced" docs as usual. -David