From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.user Subject: Re: Do we have to worry about the names of generic functions? Date: Fri, 14 May 2004 20:53:20 +0100 Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Message-ID: <1084564399.32494.86.camel@localhost> References: <1084358048.15175.235.camel@localhost> <87isf0qiiw.fsf@trouble.defaultvalue.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1084636088 28315 80.91.224.253 (15 May 2004 15:48:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 15 May 2004 15:48:08 +0000 (UTC) Cc: Guile Users Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sat May 15 17:47:57 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BP1OG-0000hy-01 for ; Sat, 15 May 2004 17:47:56 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BP1Mf-0005rv-W5 for guile-user@m.gmane.org; Sat, 15 May 2004 11:46:18 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BP1LV-0005gS-GE for guile-user@gnu.org; Sat, 15 May 2004 11:45:05 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BP1Kz-0005df-HS for guile-user@gnu.org; Sat, 15 May 2004 11:45:04 -0400 Original-Received: from [216.166.232.203] (helo=johnson-resources.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1BP1Kz-0005dQ-9h for guile-user@gnu.org; Sat, 15 May 2004 11:44:33 -0400 Original-Received: from localhost (mantis.schoolnet.na [::ffff:196.44.140.238]) (AUTH: LOGIN wingo) by johnson-resources.com with esmtp; Sat, 15 May 2004 11:39:26 -0400 Original-Received: from wingo by localhost with local (Exim 3.36 #1 (Debian)) id 1BOikM-00017L-00; Fri, 14 May 2004 20:53:30 +0100 Original-To: Rob Browning In-Reply-To: <87isf0qiiw.fsf@trouble.defaultvalue.org> X-Mailer: Ximian Evolution 1.5.7 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.user:3176 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:3176 Hi Rob, On Thu, 2004-05-13 at 13:38 -0500, Rob Browning wrote: > I just asked basically the same question on guile-devel, not realizing > you'd already done so here :> Hehe ;) > > To put it another way: what's the difference between (output x) and the > > more smalltalk-like (x 'output)? > > One thing to consider is that at least in CLOS (and I'd presume GOOPS, > though I'm not as familiar with it), there are more sophisticated > multiple argument dispatch and multiple inheritance issues that may > distinguish the C++/python-esque "x.foo()" from CLOS/GOOPS "(foo x)", True. But consider this: The set of python objects which have a foo method is similar to the set of GOOPS objects which exist in the specializers of a foo method. Specialization can only tighten the set of objects to which foo can apply, which makes foo's dent on the namespace even smaller. > * Using generics might be less readable. > > Yes, though choosing more distinguishing function names does have the > advantage that you can easily do things like > > fgrep '(gtk-close' *.scm Although in the context of g-wrap we're dealing with generics that have no procedural counterparts, (gnome gtk) for gtk2 provides both. So in this case the choice is with the programmer. Furthermore, as Andreas mentioned you can always use a prefix renamer. At this point my brain is saying "don't worry about the names" and my gut is saying "don't export anything without a prefix" ;) But it doesn't seem like there's a technical reason to restrict the names, so long as they don't conflict with non-generics. Cheers, -- Andy Wingo _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user