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 Sun, Jan 30, 2000 at 12:30:36AM -0330, Greg Harvey wrote:
> 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 ;).

Hmm? I _am_ from c++... and I like what I see above :-) Perhaps
we could shuffle some stuff around, and of course I forgot a ()
for superclasses, but the overal form is pretty straightforward
for someone coming from a c++ (probably /java) background.


In case of doubt, this is my actual OOP background, in
chronological order (at least the stuff that I really used, I
won't count academic study on stuff like TOM, SmallTalk, ObjC,
and Self that I probably don't even remember anymore).

- Borland's OO Pascal (from TP5 to BP7, I never touched Delphi)
- brief contact with an utterly ugly yet clever Borland hack
  named Object-Assembler or something
- C++ (first for OS/2, then Linux/libg++, then ISO)
- brief contact with Java, gave up in pain for the poor
  runtimes that were available at the time
- Python
- GOOPS
- Zope/DTML

Every now and then I try again to learn Perl, then I reach the
conclusion that I and Larry Wall probably aren't from the same
planet. Perl's concept of ``OOP'' is even worse, I don't like
to think about it on account of a weak stomach.


Back to the discussion, here is what I think is worth trying to
improve on my proposal for a ``create-class'' syntax:

- the ``options'' parameter sucks :-) is there a better way to
  pass stuff like ``private''?
- the order of return type, name and options is open to
  discussion.
- how to best represent something with undefined return
  (``void'')?

I really think this is a good sollution, because it's easy to
make translators work on top of that. (As you see, most of my
current efforts are related in one way or another to making
translator lives easier ;-) )

[]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]