On 4 nov, 04:57, "Tony" <t...@my.netwrote:
Will C ever have OO (any) as part of the std?
Tony
You can download the "C Object System" from sourceforge which is a
pure C library. The current release is 0.7 but it's already pretty
stable for the CosBase module which is the required module to do OO in
C. It requires a C99 preprocessor but a C89 compiler once preprocessed
(obviously a C99 compiler is ok). The CosStd module is still under
development (unstable).
The features provided by COS go far beyond to other framework (e.g.
GObject) and some languages (e.g. Objective-C):
- uniform object model (class, metaclasses) better organized than in
Objective-C
- multimethods (methods member of more than one class) with a
dispatcher faster than Objective-C and as fast as virtual function of C
++ (for single dispatch).
- fast message forwarding (about 50-80 faster than Objective-C)
- exception and contract
- ownership and memory management
- introspection
- closure
- thread compliant (use TLS if available, pthread otherwise)
I can send you some transparencies on COS as a (very short) manual,
but still enough since COS is rather simple for C programmers with
minimum OO knowledge.
regards,
ld.