[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A couple of questions about goops method parameters
From: |
Marko Rauhamaa |
Subject: |
Re: A couple of questions about goops method parameters |
Date: |
Wed, 03 Sep 2014 19:47:39 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) |
Carlos Pita <address@hidden>:
> 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 (<point> .x .y)
(define (x) .x)
(define (y) .y)
(make-object #f x y))
(let ((point (<point> 7 8)))
(point #:y))
=> 8
Marko
- A couple of questions about goops method parameters, Carlos Pita, 2014/09/02
- Re: A couple of questions about goops method parameters, Carlos Pita, 2014/09/03
- Re: A couple of questions about goops method parameters,
Marko Rauhamaa <=
- Re: A couple of questions about goops method parameters, Panicz Maciej Godek, 2014/09/03
- Re: A couple of questions about goops method parameters, Nala Ginrut, 2014/09/05
- Re: A couple of questions about goops method parameters, Carlos Pita, 2014/09/05
- Re: A couple of questions about goops method parameters, Panicz Maciej Godek, 2014/09/05
- Re: A couple of questions about goops method parameters, David Thompson, 2014/09/05
- Re: A couple of questions about goops method parameters, Panicz Maciej Godek, 2014/09/05
- Re: A couple of questions about goops method parameters, David Thompson, 2014/09/05
- Re: A couple of questions about goops method parameters, Taylan Ulrich Bayirli/Kammer, 2014/09/05
- Re: A couple of questions about goops method parameters, David Thompson, 2014/09/05