This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: goops/guile doc (was Re: Simple example program to illustrate Goops)


On Fri, Jan 28, 2000 at 02:06:41PM -0330, Greg Harvey wrote:
> 
> Actually, it might make an interesting little project to provide a
> translator from a limited OO style of declaring classes (maybe
> something javaish, without some of the funkiness of java) to the
> corresponding goops code. So, you could have something like:
> 
> class Kons {
>         private long car, cdr;
>         public long car() (car);
>         public long cdr() (cdr);
>         public void set-car! (long val) (set! car val);
>         /*etc..*/
>         }

Why not the same thing with well-behaved scheme?

(create-class Kons
   (<int> car ('private))
   (<int> cdr ('private))
   (<int> car () () (car))
   (<int> cdr () () (cdr))
   (() cdr () (<int> val) (set! car val))
   ; etc
   )

or something to that effect? One of the cool things about goops
is that it allows us to ``plug in'' our own object systems -
I'm playing with the idea of writing a dictionary-based one
(similar to Python's) if I find that to be useful to the Python
translator.


[]s,
                                               |alo
                                               +----
--
      I am Lalo of deB-org. You will be freed.
                 Resistance is futile.

http://www.webcom.com/lalo      mailto:lalo@webcom.com
                 pgp key in the web page

Debian GNU/Linux       ---       http://www.debian.org
Brazil of Darkness   --   http://zope.gf.com.br/BroDar


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]