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: EIEIO Date: Fri, 14 Mar 2014 07:42:04 +0100 Message-ID: <87vbvh9t8j.fsf@engster.org> References: <53212048.70901@siege-engine.com> <5321B561.2030004@online.de> <53224F2B.3070600@siege-engine.com> <532268F2.60809@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1394779346 2949 80.91.229.3 (14 Mar 2014 06:42:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 14 Mar 2014 06:42:26 +0000 (UTC) Cc: emacs-devel@gnu.org, Andreas =?iso-8859-1?Q?R=F6?= =?iso-8859-1?Q?hler?= , "Eric M. Ludlam" To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 14 07:42:35 2014 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 1WOLpC-0004c6-GZ for ged-emacs-devel@m.gmane.org; Fri, 14 Mar 2014 07:42:34 +0100 Original-Received: from localhost ([::1]:43158 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOLpC-0003uL-6L for ged-emacs-devel@m.gmane.org; Fri, 14 Mar 2014 02:42:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50596) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOLp3-0003uC-SD for emacs-devel@gnu.org; Fri, 14 Mar 2014 02:42:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WOLox-0008Q3-Rx for emacs-devel@gnu.org; Fri, 14 Mar 2014 02:42:25 -0400 Original-Received: from randomsample.de ([5.45.97.173]:35808) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOLox-0008OD-J6 for emacs-devel@gnu.org; Fri, 14 Mar 2014 02:42:19 -0400 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=IY43JUNc/vRYRiyF+r5KBX1RJ8DREA+UBISYOfXpTWw=; b=V6zCG8mdiUVgFSELVthILRcjfpN7wL+Noa7VDLuOgCepR5ghckhb8zQuHvlkRir/UM0e8ImNwkK17PRvkU6jbw9fljd1mOVBKIb3PY6Hhe0KNlqU+jmswSaJafQmbBO/; Original-Received: from dslc-082-083-035-020.pools.arcor-ip.net ([82.83.35.20] helo=spaten) by randomsample.de with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1WOLop-0006vF-AJ; Fri, 14 Mar 2014 07:42:11 +0100 In-Reply-To: <532268F2.60809@dancol.org> (Daniel Colascione's message of "Thu, 13 Mar 2014 19:26:58 -0700") User-Agent: Gnus/5.13001 (Ma Gnus v0.10) Emacs/24.3 (gnu/linux) Mail-Followup-To: Daniel Colascione , "Eric M. Ludlam" , Andreas =?iso-8859-1?Q?R=F6hler?= , emacs-devel@gnu.org 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:170337 Archived-At: Daniel Colascione writes: > A while ago, I considered using EIEIO for one of my projects; I decided > to use plain defstructs instead. I didn't like how EIEIO required each > object to have a name (requiring that EIEIO allocate a new string for > each object instance), and I had very simple interface requirements, and > found calling funcall on a struct slot more straightforward than a > generic function. For simple projects, I don't use EIEIO either. However, from my experience, the defstruct/funcall thing soon becomes tedious and confusing on bigger projects. I think the main problem is that those things aren't "self-documenting", which makes understanding and maintaining such a code base difficult. In EIEIO, you can provide documentation for pretty much anything, and it is integrated in Emacs' help system[1], allowing you to jump to the different implementations of a method. I find this to be a big advantage, well worth the initial learning time. -David [1] At least this was the case for EIEIO in CEDET upstream, where we did this through defadvice. Unfortunately, it took until a few weeks ago to properly integrate this in Emacs proper.