From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marko Rauhamaa Newsgroups: gmane.lisp.guile.user Subject: Re: A couple of questions about goops method parameters Date: Wed, 03 Sep 2014 19:47:39 +0300 Message-ID: <878um0mz10.fsf@elektro.pacujo.net> References: <8761h466wd.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1409762915 1791 80.91.229.3 (3 Sep 2014 16:48:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Sep 2014 16:48:35 +0000 (UTC) Cc: guile-user@gnu.org To: Carlos Pita Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Sep 03 18:48:26 2014 Return-path: Envelope-to: guile-user@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 1XPDjN-0000qn-Ok for guile-user@m.gmane.org; Wed, 03 Sep 2014 18:48:25 +0200 Original-Received: from localhost ([::1]:46641 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPDjN-0001t5-1R for guile-user@m.gmane.org; Wed, 03 Sep 2014 12:48:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50866) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPDj9-0001s7-P1 for guile-user@gnu.org; Wed, 03 Sep 2014 12:48:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPDj3-0007Wf-KC for guile-user@gnu.org; Wed, 03 Sep 2014 12:48:11 -0400 Original-Received: from pacujo.net ([83.150.83.132]:59232) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPDj3-0007O1-CQ for guile-user@gnu.org; Wed, 03 Sep 2014 12:48:05 -0400 Original-Received: from elektro.pacujo.net (192.168.1.200) by elektro.pacujo.net; Wed, 3 Sep 2014 19:47:39 +0300 Original-Received: by elektro.pacujo.net (sSMTP sendmail emulation); Wed, 3 Sep 2014 19:47:39 +0300 In-Reply-To: <8761h466wd.fsf@gmail.com> (Carlos Pita's message of "Wed, 03 Sep 2014 12:49:38 -0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 83.150.83.132 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 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 Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:11452 Archived-At: Carlos Pita : > So, a question to the experienced lispers here, a question that's not > specifically guile or goops or scheme related. Is the make (or > make-instance) way of constructing a new instance usually exposed to > the final user? Or a factory function, operating at a higher level of > abstraction, is intended to wrap the lower level, slot-fillig > oriented, call to make? In this case, a custom initialize method > implementation should be seen more as a complement to make than as a > proper constructor/factory. I saw the light and left goops behind. I built a simple system: * Not slot-centric but method-centric. * No classes, only objects. IMO, the end result is more schemey than Goops. It contains: (make-object parentage . methods) where parentage is #f, an object or a list of objects methods contains procedures, or name-procedure pairs Example: (define ( .x .y) (define (x) .x) (define (y) .y) (make-object #f x y)) (let ((point ( 7 8))) (point #:y)) => 8 Marko