Back to the Vavoom Forum Archives


Forum

[Won't do] Meta-Object Protocols

Sun, 01 Sep 2002 18:22:55

roy5050

In an OO language such as C++, Java, and hopefully vcc; A meta-object protocol is a standard way to extend the object ("class") system so that things like multiple-inharitance, multimethods ("works with more than one class") and alternate orders of evaluation can be implemented in a strait-forward manner.<br><br>The book "The Art of the Meta-Object Protocol" explains all about it + I'm sure you can find info. about Meta-Object Protocols (MOPs) on the web.<br><br>The MOP deals with implementing metaclasses (classes that control how standard classes work) and metamethods (methods that control how the class system works) and be defined or extended upon.<br><br>The use of the MOP is to make it easier to implement system tools such as class browsers, GUIs (like Smalltalk-80), new OO features, different OO techniques, etc.) or any other "system tool" more easily.
Mon, 02 Sep 2002 11:59:07

JinnaiGuy

I think it might help if you explain WHY this is a good idea to implement?  And where?
Tue, 03 Sep 2002 10:15:36

roy5050

The metaobject protocol would be implemented<br>as primatives to the class construct.<br><br>so you could issue commands such as<br><br>class Actor extends class;<br><br>class Actor allows MultiMethods;<br>class Actor allows StaticStorage; // Vars are stored to disk kind of like #define's<br><br>method Actor::eval runs at sys:start_up;<br>method Actor::compress_file runs at sys:compile_time;<br><br>or other simular syntax.<br><br>Basicly a MOP is a preprocessor that allows the<br>attributes attributed to the class special_form (command) to be modified by the programmer so that<br>OO features not found in C++,vcc,etc can be easily added--this allows developers to play (experiment) with different OO paradimes and make their code easier to read and remove kludges.<br><br>The MOP's point is to define functions that class will end up calling in a platform independant way. (Functions a class might call would do things like allocate memory for classes, build a class table, look up methods, decide which method applies if two or more methods exist, and other house keeping tasks for OO programming.)<br><br>If the house keeping methods are implemented as objects people can modify or extend the OO system without having to rewrite the compiler, and make their programms cleaner. (People will then have to use less hacks; thusly producing more readable/understandable code.)
Fri, 06 Sep 2002 03:01:43

Janis Legzdinsh

You really know ways how to make things complicate. ;D I'm not going to support multi-inheritance in VavoomC. <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->
Fri, 06 Sep 2002 10:09:39

JinnaiGuy

If it makes you feel any better, VavoomC and ACC work for me.  As is.   <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->  (Not that YOU wrote ACC, I just mean simple is fine with me)

Back to the Vavoom Forum Archives