Real OOP in Euphoria
- Posted by Ralf Nieuwenhuijsen <nieuwen at POP.XS4ALL.NL> Jun 04, 1997
- 915 views
Real Object Oriented Programming in Euphoria ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ I saw the OOP program available at the Euphoria site, but the author doesn't really understands the use of OOP, does he??? OOP is about little pieces of code which hold their own variables and which you can give commands or ask about something. The underlining code is not important and can be changed at will. OOP is NOT about sequence elements which are named instead of numbered. This effect could easily be done by constants... If you want real OOP, you should write a pre-processor which replaces all the code and makes normal functions out of them. However euphoria is more OOP as you might think since variables can be at will be used as public (global atom kip) or as private (atom kip). The same way you can have routines public or private (global or not!) (This applies within the .E file) You just can't have instances of a class (an object) But this can easily be done by a pre-processor, and sequencing all the var's in one sequence, containg the vars for all instances. If nobody's wants to write but does really want this kind of preprocessor, ask me and i'll code... (ask me nicely!!) But i guess it isn't really needed in Euphoria, cause like the refman.doc said it achieves the same benefits in a much simpeler way. Ralf Nieuwenhuijsen nieuwen at xs4all.nl