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)


Lalo Martins <lalo@webcom.com> writes:

> 
> 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
>    )

We're trying to win over the people from java/c++, not scare the crap
out of 'em ;). What I was thinking of is something similar to the
syntax of the more popular languages... it would still include some
amount of scheme in there (it wouldn't have to, but that would make it
much easier to actually implement than a full foo-language->scheme
translator).  The idea is more for a small learning tool than
something dreadfully useful; it would give the ability to play around
with objects, seeing how common things from other languages translate
(or not) to a clos-style system. Of course, the pitfall is that you'd
probably end up with more people using that instead of the real
system, leading to a gross hack with stuff piling up and up until it's
a big jumbled mess... kind of like c++, I guess, but with fewer
redeeming features, like... umm... a guy with a name like Stroustrup
(sorry, can't think of anything else that I'd consider a redeeming
feature of c++, 'cept maybe that it can be avoided ;).

> 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.

Actually, one of the great things about scheme (or lisp in general) is
that it allows you to do cool stuff very quickly compared to most
other languages (I'd expect that someone familiar with scheme and
goops could slap together the above sort of thing in an hour or
so)... which isn't really relevent, but it always amazes me how
quickly a lot of complex things can be implemented in lisp :).

-- 
Gregh: which is not to say that I'm planning to work on it... I can
hardly scrape together time for the gc at the moment, and that's been
gestating longer than a baby elephant, so it's starting to kick a bit
;).

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