From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Clinton Ebadi Newsgroups: gmane.lisp.guile.user Subject: Re: Simplified slot access in goops Date: Tue, 02 Dec 2008 04:32:24 -0500 Message-ID: <87ljuyylav.fsf@unknownlamer.org> References: <49dd78620812011425k2720df81tbf3820b429ba7ba@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1228210422 32022 80.91.229.12 (2 Dec 2008 09:33:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 2 Dec 2008 09:33:42 +0000 (UTC) Cc: guile-user@gnu.org To: "Neil Jerram" Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Dec 02 10:34:35 2008 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L7ReM-0002O0-Ck for guile-user@m.gmane.org; Tue, 02 Dec 2008 10:34:34 +0100 Original-Received: from localhost ([127.0.0.1]:51033 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L7RdC-0005Y8-4S for guile-user@m.gmane.org; Tue, 02 Dec 2008 04:33:22 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L7RcY-0005Q5-DZ for guile-user@gnu.org; Tue, 02 Dec 2008 04:32:42 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L7RcV-0005PM-Cm for guile-user@gnu.org; Tue, 02 Dec 2008 04:32:40 -0500 Original-Received: from [199.232.76.173] (port=37231 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L7RcV-0005PA-4a for guile-user@gnu.org; Tue, 02 Dec 2008 04:32:39 -0500 Original-Received: from deleuze.hcoop.net ([69.90.123.67]:41917) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L7RcT-00006i-OB for guile-user@gnu.org; Tue, 02 Dec 2008 04:32:38 -0500 Original-Received: from cpe-024-211-230-216.nc.res.rr.com ([24.211.230.216] helo=rvannith) by deleuze.hcoop.net with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1L7RcQ-0008AM-1r; Tue, 02 Dec 2008 04:32:34 -0500 In-Reply-To: <49dd78620812011425k2720df81tbf3820b429ba7ba@mail.gmail.com> (Neil Jerram's message of "Mon, 1 Dec 2008 22:25:30 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:6988 Archived-At: "Neil Jerram" writes: > 2008/11/27 Maciek Godek : > >> Perhaps the possible inconvenience is that all variable >> names that happen to be the slot names of a given class >> are shadowed. In the long run it may also cause significant >> performance problems (or that's what I think), especially >> when dealing with objects with a hell lotta slots. >> >> I wonder if it would be possible to make it optimizable >> for the JIT compiler somehow (and to make the "in" syntax >> official part of GOOPS) > > I think this is a nice interface; but I'm less sure about the > implementation. Why do you need to use primitive-eval at all? > > Isn't CL's with-slots a bit like this? It might help to look at how > that is implemented. with-slots uses symbol-macrolet[0] to bind each of the variable names to symbol macros within its body. I don't know of anything in Guile that is equivalent. [0] http://franz.com/support/documentation/6.0/ansicl/dictentr/symbol-m.htm -- Ruled by the ebb of my oceans Slaves to the dusk and the dawn Your petri dish civilisations Are buried and born