From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.devel Subject: Re: Applicable GOOPS objects? Date: Sat, 24 Mar 2012 14:07:43 -0400 Message-ID: <87limpna8g.fsf@netris.org> References: <87k42bnnt4.fsf@netris.org> <87obrmlhwo.fsf@olor.terpri.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1332612628 6193 80.91.229.3 (24 Mar 2012 18:10:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 24 Mar 2012 18:10:28 +0000 (UTC) Cc: guile-devel@gnu.org To: BT Templeton Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Mar 24 19:10:27 2012 Return-path: Envelope-to: guile-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 1SBVPz-0005Xx-Mg for guile-devel@m.gmane.org; Sat, 24 Mar 2012 19:10:23 +0100 Original-Received: from localhost ([::1]:49503 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SBVPy-0003a6-Qu for guile-devel@m.gmane.org; Sat, 24 Mar 2012 14:10:22 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42214) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SBVPv-0003ZJ-59 for guile-devel@gnu.org; Sat, 24 Mar 2012 14:10:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SBVPt-0003SV-Br for guile-devel@gnu.org; Sat, 24 Mar 2012 14:10:18 -0400 Original-Received: from world.peace.net ([96.39.62.75]:54442) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SBVPt-0003SK-4Q for guile-devel@gnu.org; Sat, 24 Mar 2012 14:10:17 -0400 Original-Received: from c-98-216-245-176.hsd1.ma.comcast.net ([98.216.245.176] helo=yeeloong) by world.peace.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1SBVPm-0005iZ-86; Sat, 24 Mar 2012 14:10:10 -0400 In-Reply-To: <87obrmlhwo.fsf@olor.terpri.org> (BT Templeton's message of "Sat, 24 Mar 2012 00:52:39 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 96.39.62.75 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:14183 Archived-At: BT Templeton writes: > GOOPS defines an metaclass for this (similar > to AMOP's funcallable-standard-class): > > scheme@(guile-user)> (define-class ()) > scheme@(guile-user)> ((make #:procedure car) '(1 2)) > $1 = 1 > > Would it work to simply have all Python metaclasses inherit from > ? On second thought, I see a problem with this idea: it would mean that 'procedure?' would return true for _any_ Python object. In order to avoid this problem, the Python implementation would need to know at class-creation time whether the __call__ method will be supported. My knowledge of Python is very rusty, but I'm pretty sure that the user could add a __call__ method at any time. Mark