This is the mail archive of the guile@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]

smob calling (Re: mildly incompatible change)



>        TO_STRING is used by the printer and must return a string.  All
>        foreign objects are printed in hash notation.

I prefer the print going to a port actually,
for big objects is doesn't thrash memory and if you really want a string
then you can write a `string port' (equivalent to C++ strstream).

>        The CALL method is called when our object appears in functional
>        position.

This seems really useful and could be the basis for making guile more
object oriented. Unfortunately there are so many proposals for object oriented
scheme extensions that it is almost scary to meet yet another proposal.

There is a slight additional problem that having smobs with a magic CALL
ability means that the smob has powers that are impossible to duplicate with
normal guile objects (or am I wrong?). I don't like the idea of extensions
to the language being above the normal limitations and rule of that language.

	- Tel