From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: EIEIO Date: Thu, 13 Mar 2014 19:26:58 -0700 Message-ID: <532268F2.60809@dancol.org> References: <53212048.70901@siege-engine.com> <5321B561.2030004@online.de> <53224F2B.3070600@siege-engine.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jmNanUe9l8F6GlnuktNw4G4VA8aRTiXMt" X-Trace: ger.gmane.org 1394764037 24088 80.91.229.3 (14 Mar 2014 02:27:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 14 Mar 2014 02:27:17 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Eric M. Ludlam" , =?ISO-8859-1?Q?Andreas_R=F6?= =?ISO-8859-1?Q?hler?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 14 03:27:26 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 1WOHqI-0006CB-3y for ged-emacs-devel@m.gmane.org; Fri, 14 Mar 2014 03:27:26 +0100 Original-Received: from localhost ([::1]:42420 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOHqH-0005I8-BZ for ged-emacs-devel@m.gmane.org; Thu, 13 Mar 2014 22:27:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48732) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOHq9-0005I2-8I for emacs-devel@gnu.org; Thu, 13 Mar 2014 22:27:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WOHq2-0002gC-V5 for emacs-devel@gnu.org; Thu, 13 Mar 2014 22:27:17 -0400 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:36715) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOHq2-0002ec-Ku for emacs-devel@gnu.org; Thu, 13 Mar 2014 22:27:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:In-Reply-To:References:Subject:CC:To:MIME-Version:From:Date:Message-ID; bh=//dlXyS0iZdPwFKMi4mDDHbvPrXlD5JuUpvfxeyU0Kg=; b=b1GHQZS9L5+1dL10x+/rM8EkH5toTKDuTC4GELSly1gP250vtUdMjKVsVpkD7bi1aGqb4QxeP4ur/Doxjt7UXnOMrdx9J6nlu+kNOVt60gLjbR1uZiDKZi/mI+YNXd0yl7Is2lI/zvi8qyARo/BVJyFv8O/HwN+9DJtiXadL8IVgzwkzSN3Nkdwj71TbnHL9W6GqIyTos9vgZxF1LlKNzJBzGBWjflSBbj7hF4n9HJANln4u/hx0ev1WQfMNvhWLPRH852WdF5PNRJE0nmQKu+SzZMDOYaURCwQ93+/AsmF1j6ZGIWruVnlon4vZcg8nDxynE3ayv75T2QbK21M1Ig==; Original-Received: from c-76-104-210-106.hsd1.wa.comcast.net ([76.104.210.106] helo=[192.168.1.50]) by dancol.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1WOHpr-0002r0-TV; Thu, 13 Mar 2014 19:26:59 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 In-Reply-To: <53224F2B.3070600@siege-engine.com> X-Enigmail-Version: 1.6 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 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:170333 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --jmNanUe9l8F6GlnuktNw4G4VA8aRTiXMt Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 03/13/2014 05:36 PM, Eric M. Ludlam wrote: > The key thing that EIEIO lets me do is define interfaces that allows > modules to work together. For example, there is a tag-table concept in= > the semantic system for managing lists of symbols found in the source > code it parses. The parser system all knows how to populate and > maintain a table. There is also code that searches tables so you can > find a tag to jump to, for example. By defining the core interface as = a > table class with EIEIO, I can also create other classes that manages ta= g > tables from GNU Global, and just stick it in a list of other tables to > search. The code searching tables doesn't have to know about GNU > Global. The Global person doesn't have to know about jumping to tags. > And no-one has to write some weird bit of code that reaches into a plis= t > to get a function symbol to call. I was able to move the Java > completion in CEDET from in-file only to surprisingly robust for Androi= d > in an afternoon just by writing a database that parses a few.jar files.= > Nifty. Thanks for putting work into CEDET. I expect to be writing some Java in the near future, so I'll probably be taking a much closer look at it soon= =2E I agree that polymorphism is useful when implementing and extending a system like CEDET. Emacs has traditionally used dispatch functions in cases like this, though: look at file-name-handler-alist. Consequently, EIEIO feels a bit foreign. What motivated the choice of EIEIO over dispatch functions or defstructs with function slots? 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. I still don't know how method dispatch actually works or what the performance characteristics of the various combination methods are. It's also not clear what happens on method redefinition, package unloading, and so on. CLOS is a comprehensive OO system, but I'm not sure we're dealing with a problem that actually requires its power. --jmNanUe9l8F6GlnuktNw4G4VA8aRTiXMt Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJTImjyAAoJEMAaIROpHW7Il8oP/1I2eIxcU7PWq2nzGd6x+63w eVA0NII30cMHF1muSlWLuIy5o3XdfUz4vMdWAmUwkrP12PhJT6kx8agHSZqXMR8S gFCGX5lFo7zR3gIfVwu2qqNMqMD6o9SuIzJkqQPfP6HG3juZ1yrNASw8S6P6BdpL wDoh+aWyPG8KEKgF2oo1rQn1nGGytwt9XHhC0ElPBbf4W+iVtQ9rDwLn1eoMSD5K i3RXliVrst+Y1GCIGbeSA2wwBJSD0mVLlBM/eTRmNJVQZcSIRB1Yq4w04CfKeuCH /MwxljbSylySIutwKRXMwKP51pix1ej1HS1MhnlSI81qkzIqHxqiXXqcqT8zu4UJ eCq8RA9bgGWcerBX+stIZ7b1or/qN6i6j6KC8u/77yc3AdeBVl5IVtZJVjKfmx9g BpxSAhAg84u//RyOIYQvJ14GUunc5aE9cVUFEZ3zkL1XbCFCAUPTp2aW6GMNezI4 Czk9ojFj+gSkhRiGJOdZlDWBhIoLlHMBri/4mhO0WlbNJ04Pnx/Xvvut9LSB8heZ 5N1et9M6bZsFZxLWj/ObdsuW43zxUHqczf2QCOjhWGVIsPq4GCxB6b7L6wqE5CZ0 b13yfptKf0vaNlhMqYjcIoa0QXYaxVQM1UL2RDvUgWDW9jKMXDD6/RWdaMDzTnCu DVyqLIWTEHB13O4SYRT5 =mKZJ -----END PGP SIGNATURE----- --jmNanUe9l8F6GlnuktNw4G4VA8aRTiXMt--