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)



> > This has more practical consequences, too.  For example, folks were
> > just talking about binary I/O functions, and it was pointed out that
> > it makes sense to apply them not only to streams, but also to strings,
> > byte arrays, hypothetical pointer types, and so on.
> > 
> > Well, suppose we defined generic functions `fetch' and `store'.  Then
> > suppose we define a GOOPS class <representation>, which has elements
> > like 16-bit-be-unsigned-int ("be" == "big-endian"), 32-bit-le-signed-int,
> > 64-bit-ieee-float, and so on.
> 
> Do you mean 16-bit-be-unsigned-int is a class that inherits from
> <representation>?

Yes, to make GOOPS help you choose the right primitive for both the
source and the type.

But in general, I should apologize --- my example was total fiction.
I've never actually implemented anything like that, so it may be
totally bogus.  I should have been patient and found something better.

I guess my point is that, when you think about an algorithm, you may
have in mind specific types for several of its arguments, not just
one.  CLOS/GOOPS lets you say things like that.

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