From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] trunk r116995: cl-lib defstruct introspection Date: Mon, 21 Apr 2014 22:03:18 -0400 Message-ID: References: <53555822.3080007@dancol.org> <53559B0D.3070505@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1398132228 25269 80.91.229.3 (22 Apr 2014 02:03:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Apr 2014 02:03:48 +0000 (UTC) Cc: emacs-devel@gnu.org To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 22 04:03:41 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 1WcQ3g-0006V2-Sh for ged-emacs-devel@m.gmane.org; Tue, 22 Apr 2014 04:03:41 +0200 Original-Received: from localhost ([::1]:52341 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcQ3g-00036e-GQ for ged-emacs-devel@m.gmane.org; Mon, 21 Apr 2014 22:03:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37836) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcQ3X-00036R-2T for emacs-devel@gnu.org; Mon, 21 Apr 2014 22:03:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WcQ3P-0001Uq-Ib for emacs-devel@gnu.org; Mon, 21 Apr 2014 22:03:31 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:36183) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcQ3P-0001Uc-D9 for emacs-devel@gnu.org; Mon, 21 Apr 2014 22:03:23 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id s3M23IKg006385; Mon, 21 Apr 2014 22:03:19 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 5E8A5600CA; Mon, 21 Apr 2014 22:03:18 -0400 (EDT) In-Reply-To: <53559B0D.3070505@dancol.org> (Daniel Colascione's message of "Mon, 21 Apr 2014 15:26:21 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4919=0 X-NAI-Spam-Version: 2.3.0.9378 : core <4919> : inlines <752> : streams <1164241> : uri <1736902> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 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:171557 Archived-At: > Can it? I tried it in vc-dir and got a completely unrelated ChangeLog hunk. Yes, there's a long-standing problem in vc-dir, such that it only works well if you mark the files you're going to commit (basically the changelog-copying feature needs the list of files that will be committed and vc-dir doesn't provide it unless you manually mark each file). Patch welcome. >>>> I'm curious: when/where did you bump against a need for that? >>> I have a few private macros that lexically bind structure slots, >> Which part makes it impossible/impractical to use standard accessors for >> that? > :conc-name, for starters. Also, :read-only, although you could argue > that you shouldn't go around mutating read-only slots anyway. I guess I don't know what you mean by "lexically bind structure slots". Can you give an example? > Better to just define additional interfaces for optional functionality. > The interface approach seems decently light and extensible, and the > implementation complexity is low. An object system based on interfaces sounds fine (tho I'm not sure if it'll really end up simpler). But note that every closure is made of 2 arrays, so a struct of 4 closures will really be made of 9 arrays, and usually the only thing closed-over will be "the additional data" (i.e. the attributes usually stored in "self"), so if we could handle this object (the "self") specially we'd avoid all 4 closures. Stefan