From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nala Ginrut Newsgroups: gmane.lisp.guile.user Subject: Re: GOOPS:Can I just overload "slot-set!" under #:virtual and let alone "slot-ref" ? Date: Fri, 3 Dec 2010 08:52:37 +0800 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0016e64c2a1a67d33a049676f4a1 X-Trace: dough.gmane.org 1291337568 601 80.91.229.12 (3 Dec 2010 00:52:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 3 Dec 2010 00:52:48 +0000 (UTC) Cc: guile-user@gnu.org To: Neil Jerram Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri Dec 03 01:52:44 2010 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.69) (envelope-from ) id 1POJtD-0003H0-Vi for guile-user@m.gmane.org; Fri, 03 Dec 2010 01:52:44 +0100 Original-Received: from localhost ([127.0.0.1]:44564 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POJtD-0001Lu-Jq for guile-user@m.gmane.org; Thu, 02 Dec 2010 19:52:43 -0500 Original-Received: from [140.186.70.92] (port=56117 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POJt9-0001Lp-LE for guile-user@gnu.org; Thu, 02 Dec 2010 19:52:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1POJt8-0002jM-L3 for guile-user@gnu.org; Thu, 02 Dec 2010 19:52:39 -0500 Original-Received: from mail-iw0-f169.google.com ([209.85.214.169]:57744) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1POJt8-0002jI-FE for guile-user@gnu.org; Thu, 02 Dec 2010 19:52:38 -0500 Original-Received: by iwn41 with SMTP id 41so2055034iwn.0 for ; Thu, 02 Dec 2010 16:52:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=TQJXOo6VQ5lB9GRJzfP8zPvuytzhC4K47wrN1HHN2EI=; b=WjACj07RtDZ/wMIJW+HZ175IPOiKwaTDyl/mnuIbK784/UgQjmor0iFRfsU/STdKZZ YalX/6d3OC9kjsaioEGwqSxCTCkwUgWmtBLoOm+mnLJ5XMvCV4+XSVz73cfQm2mxtMcC /KLRjEX8h1vnVa6FWUWxKF9pz6046XDvmzHsk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=F6+zdXDR5q+kfT1E9V/ESymnZTQzIZWLGndTGPc9CBOs6gse3c3jwjLJVofqPya9DA 8ROi6E+hJjV12fVY07E/fBTPgou1VeXYkAOsScavcP9IasswT9dw3INN5c5q9Z5fBRQn hC30TOL2EgNMWJ2ueXJTYouVWQ014jZBvZR50= Original-Received: by 10.231.144.70 with SMTP id y6mr1000572ibu.99.1291337557594; Thu, 02 Dec 2010 16:52:37 -0800 (PST) Original-Received: by 10.231.11.203 with HTTP; Thu, 2 Dec 2010 16:52:37 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:8281 Archived-At: --0016e64c2a1a67d33a049676f4a1 Content-Type: text/plain; charset=UTF-8 thanks, but my question is something like this: ... (cache ... #:slot-ref (lambda (o) (slot-ref o 'cache)) ...) ;; ERROR ... (sunday ... #:slot-ref (lambda (o) (slot-ref o 'cache)) ...) ;; That's OK I could call "(slot-ref o 'cache)" in other slot except "cache", but what should I do if I need to use "(slot-ref o 'cache)" in the "cache" definition? I used it directly and got "stack overflow". I think it may cause infinite recursive. Actually my question can be described more explicitly: "Can I just re-define "slot-ref" or "slot-set!" any one of them but NOT both?" Sometimes I may need a re-defined "slot-set!" but I expect to let alone "slot-ref". Anybody catch my mind? --0016e64c2a1a67d33a049676f4a1 Content-Type: text/html; charset=UTF-8 thanks, but my question is something like this:
...
(cache ... #:slot-ref (lambda (o) (slot-ref o 'cache)) ...) ;; ERROR
...
(sunday ... #:slot-ref (lambda (o) (slot-ref o 'cache)) ...) ;; That's OK

I could call "(slot-ref o 'cache)" in other slot except "cache", but what should I do if I need to use "(slot-ref o 'cache)" in the "cache" definition?
I used it directly and got "stack overflow". I think it may cause infinite recursive.
Actually my question can be described more explicitly: "Can I just re-define "slot-ref" or "slot-set!" any one of them but NOT both?"
Sometimes I may need a re-defined "slot-set!" but I expect to let alone "slot-ref".
Anybody catch my mind? --0016e64c2a1a67d33a049676f4a1--