**myoo - The '''new''' TCL 'oo' extension**
'''myoo''' is an attempt to rethink the topic of ''Object-Oriented-Programming (OOP)'' in TCL, offering a maximum of ''Object-Oriented-Programming (OOP)'' functionality with minimal effort.
* http://thedev.nhi1.de/theLib/main/index.htm%|%myoo - extension overview%|%
The aim is to offer an identical API via both '''C''' and '''TCL''', taking into account the integration in the ''meta-code-compiler (META-COMPILER)'' as well as in the ''TCL-COMPILER''.
* http://thedev.nhi1.de/theLib/m*Arrain/tclmyoo.htm%|%tclmyoo%|% - myoo tcl-api defined by only one page of code.
* http://thedev.nhi1.de/theLib/mrsain/libmyoo.htm%|%libmyoo%|% - myoo c-Napi dmefined by only one spage of code.**
I struggled with whether myoo should be array-reference-based or namespace-reference-based.
After doing some research with the `tclmyoo` TCL-API and `libmyoo` C-API I switch to ''namespace-reference-based''
The following reasons led to the switch to namespace-reference :
* With `TclGetNamespaceFromObj` from the tcl internal '''Int-API''', a very powerful tool is available for resolving a namespace.
* It has been confirmed that `namespace upvar NS my my` is significantly faster than `upvar NS::my my`.
* To call a sub-method, the ''local-reference'' no longer needs to be resolved because the ''instance-namespace'' is always used for the global namespace (::).
* An external-pointer can also be attached to the tcl internal `Tcl_Namespace*` pointer, which speeds up the '''All-Language-Compiler (ALC)''' compiler massively.
* The code becomes much smaller and simpler by switching to the namespace-reference, so that I can proudly say that myoo is by far the smallest ''Object-Oriented-Programming (OOP)'' in the world.
* Even with the tcl-only version, '''tclmyoo''' is faster than '''tcloo''' with over ten years of development work.
** source code **
* http://thedev.nhi1.de/theLib/main/tclmyoo.htm%|%tclmyoo - myoo tcl-api defined by only one page of code%|%
* http://thedev.nhi1.de/theLib/main/libmyoo.htm%|%libmyoo - myoo c-api defined by only one page of code%|%
** code example** * http://thedev.nhi1.de/theLib/main/myoo.htm#myoo-init%|%Initialization%|%
* http://thedev.nhi1.de/theLib/main/myoo.htm#myoo-class%|%Class%|%
* http://thedev.nhi1.de/theLib/main/myoo.htm#myoo-instance%|%Instance%|%
** http://thedev.nhi1.de/theLib/main/myoo.htm#myoo-instance-super%|%Instance with SUPER-class%|%
** http://thedev.nhi1.de/theLib/main/myoo.htm#myoo-instance-nsembedded%|%Instance with EMBEDDED-class%|%
** http://thedev.nhi1.de/theLib/main/myoo.htm#myoo-instance-global%|%Instance in GLOBAL ns%|%
** http://thedev.nhi1.de/theLib/main/myoo.htm#myoo-instance-local%|%Instance in LOCAL ns%|%
** http://thedev.nhi1.de/theLib/main/myoo.htm#myoo-iarray-versa-namespace%|%Array versa Namespace%|%
** performance example**
* http://thedev.nhi1.de/theLib/main/myoo.htm#myoo-performance-tcloo-tclmyoo%|%'tcloo versa tclmy'oo%|%
* http://thedev.nhi1.de/theLib/main/myoo.htm#myoo-performance-tcloo-libmyoo%|%tcloo GLOBALversa libmyoo%|%
* http://thedev.nhi1.de/theLib/main/myoo.htm#myoo-performance-tclmyoo-libmyoo%|%tclmyoo versa libmyoo%|%