From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fac41,b87849933931bc93 X-Google-Attributes: gidfac41,public X-Google-Thread: 1108a1,b87849933931bc93 X-Google-Attributes: gid1108a1,public X-Google-Thread: 109fba,b87849933931bc93 X-Google-Attributes: gid109fba,public X-Google-Thread: f43e6,b87849933931bc93 X-Google-Attributes: gidf43e6,public X-Google-Thread: 103376,b87849933931bc93 X-Google-Attributes: gid103376,public X-Google-Thread: 11cae8,b87849933931bc93 X-Google-Attributes: gid11cae8,public X-Google-Thread: 114809,b87849933931bc93 X-Google-Attributes: gid114809,public From: kmajor@jagor.srce.hr (Kazimir Majorinc) Subject: Re: What is wrong with OO ? Date: 1996/12/07 Message-ID: <58b9jt$jhh@bagan.srce.hr>#1/1 X-Deja-AN: 202830109 distribution: world references: <32A4659D.347A@shef.ac.uk> followup-to: comp.lang.c++,comp.lang.smalltalk,comp.lang.eiffel,comp.lang.ada,comp.lnag.java,comp.object,comp.software-eng content-type: text/plain; charset=US-ASCII organization: Public host at University Computing Centre, Zagreb, CROATIA mime-version: 1.0 newsgroups: comp.lang.c++,comp.lang.smalltalk,comp.lang.eiffel,comp.lang.ada,comp.lnag.java,comp.object,comp.software-eng Date: 1996-12-07T00:00:00+00:00 List-Id: Hello! I spent last two years in programming (for me) very complex structures in C++, and before that in Borland's Object Pascal. Although I was very enthusiastic with OO in the beginning, I'm losing this day by day. Before few months I thinked that Smalltalk could be better than C++, now I am in doubt with this. Listen why. 1. My analyse of my work shows that I will wrote programs faster if I use some of good old procedural languages, like Modula-2. I know how you could criticize me, but I'm exposed here. 8-) 2. Encapsulation, I mean that both data and functions are together in object seems to me like very unnatural shape today. Look at mathemathics. Mathematical language do not use that paradigm, although things which are described there are more complex than any software. They use something which looks like procedural paradigm with operators. It talks to me that, paradoxaly, object paradigm could work only for simple problems, but for complex, we have to come back to procedural. Looking just hierarchicaly, functions should be one level higher than data. Moreover, it is especially unnatural that one object contains functions which uses many others. If I overload operators, for example + in C++, I have disgusting when I use object model, and I have to prefer first element, when there is absolutely no reasons for that. If I could choose, I use procedural overload. If is necessary to make groups of functions, it is better to use some sort of packages. Class with lot of function members look really unnatural. I believe Smalltalk is even worse here. 3. Polymorphism. The greatest part of OO. I understand wish, but look at C++. Why if I want to do this things, I have to do it implicitely. I mean why functions which overload each other should have same name? It is better to do it explicitely, to say which function is overload of which. Now things could be simpler. I do not know how to do it in procedural paradigm, but I believe that it is somehow possible. 4. Inheritance. It seems OK. 5. Constructors, Destructors. They are great! 6. Messages. I do not know a lot of this, but Idea that object change himself alone remembers me at the days of programming on TI57, or in assembler, when every instruction is on so called accumulator. OO wants accumulator back. I would apprettiate one copy of answer privately (because news from my server expire fast), and use my name, that I could find you with Deja News. Of course, public answer is even better. _______________________________________________ Author: Kazimir Majorinc E-mail: Kazimir.Majorinc@public.srce.hr kmajor@public.srce.hr (slightly better) http: //public.srce.hr/~kmajor (~7min to USA) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ One who knows the secret of the 7th stair