[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
3.2 Defining New Classes
[ *fixme* Somewhere in this manual there needs to be an introductory discussion about GOOPS classes, generic functions and methods, covering
- how classes encapsulate related items of data in slots
- why it is that, unlike in C++ and Java, a class does not encapsulate the methods that act upon the class (at least not in the C++/Java sense)
- how generic functions provide a more general solution that provides for dispatch on all argument types, and avoids idiosyncracies like C++'s friend classes
- how encapsulation in the sense of data- and code-hiding, or of distinguishing interface from implementation, is treated in Guile as an orthogonal concept to object orientation, and is the responsibility of the module system.
Some of this is covered in the Tutorial chapter, in Generic functions and methods - perhaps the best solution would be to expand the discussion there. ]
3.2.1 Basic Class Definition | ||
3.2.2 Class Options | ||
3.2.3 Slot Options | ||
3.2.4 Class Definition Internals | ||
3.2.5 Customizing Class Definition | ||
3.2.6 STKlos Compatibility |