Re: OOP in "official" Euphoria
- Posted by Ralf Nieuwenhuijsen <nieuwen at XS4ALL.NL> Jul 05, 1999
- 490 views
Euphoria already supports most, if not, all of the advantages of OOP. Consider: Jiri's font library using font-handles. Neil using command-lists, virtual screens, etc. The list of non-oop programs only simulating one or two of the advantages of OO is very long. Why ? Because in Euphoria, mostly due to its flexible data management, it takes few statement to do so. The only issue is the lack of 'compatibility' of the multiple systems, something also connected to the namespace-problem. In my eyes, OOP, is not the answer. It does not allow us to use 'abstract' objects we know nothing about and have them relate to other objects we know nothing about. This is only true, if even within the object's class definition, certain conventions are used, such as properties named value, etc. Would we use conventions as well, in our register/handle-managements, data-stock flow etc. we would gain the same benefits. (although I'm not talking about the benefits of structures, etc. I really mean the 'advantages' in the perspective of flexibility and re-usability. What would be the answer ? Well, personally I haven't found any _concrete_ ideologies, although I did find some 'hints' or 'directions' .. such as: -- Context-sensitivity should be the ultimate priority/goal when looking for a right name-space system. -- Independability. When you, for example, look from the OO perspective, you have a window-class, with a variable/property called 'image', should 'image' be defined in the class or independent as well. In other words, rather than specifying 'entities', you must specify how they relate to each other. (yeah, I know, I'm again heading towards prolog, but that's only for a 'data'-management type of perspective. The data I wish to manage contains program code and how it relates as well. -- Stability: entities don't change. You can't have totally different routines that are the same in your world, but apply at different moments. The reasons of the differences between them should be specified, and thus the 'concept' of the 'world' (knowledge, whatever) should remain static/stabil, rather than change. A change would indicate a 'growth' in knowledge and all though this *should* and *could* be true, it does not mean a change in 'situation' and the 'improved' situation, if it were to change, should remain afterwards. -- Because of the stability, streaming is the only logical answer. That means, that code is applied on a concept, and it shouldn't matter, if it is applied to one entity of data, or to a stream of data, etc. How often, etc. it is applied should not be in the hands of the programmer. I havent' found the answer (yet), but I do brainstorm using the above directions. If any one feels any concrete ideas arise, share them with me .... Ralf Nieuwenhuijsen nieuwen at xs4all.nl ralf_n at email.com UIN: 9389920 Http://www.xs4all.nl/~nieuwen <<< [[. .. ... ....The Elevator.... ... .. .]]