Path: utzoo!attcan!uunet!mcvax!enea!sommar From: sommar@enea.se (Erland Sommarskog) Newsgroups: comp.lang.misc Subject: Re: Object Oriented vs. Overloaded Message-ID: <3946@enea.se> Date: 14 Sep 88 21:47:19 GMT Organization: ENEA DATA AB, Sweden Lines: 42 Marc W. Mengel (mmengel@cuuxb.UUCP) writes: >Overloading is NOT equivalent to object oriented programming. Object oriented >programming is a paradigm which *can* be used in *most* programming languages. >(a variation on "Real programmers can write FORTRAN in any language...") There are they who say the opposite. Thus, you must have an OO language to do OO programming. And I am bound to agree. Some of it you can do in any language, but you will get very little help from the compiler. And some things you can't do. One important feature for object-oriented programming is garbage collection. >Overloading when taken to the extreme creates a program that the author >can read, but nobody else can. If you have to walk in cold and read > (example deleted.) I don't know if this is an argument against overloading. Of course one make mess with overloaded operators. But so you can with names too. Call all your functions 'a', 'b' etc. Or call them "addint" when they are doing searching. >Smalltalk is the only language I know of that *forces* you to operate within >the Object Oriented paradigm. C++ allows some syntactic sugar on the front >of C, but not much else (There are many who disagree on this point -- flames >to me, not the net). Ada doesn't really provide any concept of classes, >sub-classes or inheritance, so it doesn't have many built-in's for Object >Oriented programming, although you can construct such a system. First: Ada isn't an object-oriented language. But it gives better support for object-oriented progamming than many non-OO languages do. But if you want to use the paradigm throughout, you should go for a real OO language, like Eiffel. Next: Object-oriented programming and overloading don't go hand in hand. Eiffel, which is probably the most object-oriented langauge, there is, doesn't have overloading. I'm reading Meyer's book right now, and haven't fully learned the language, but I can't see how overloading should fit there. -- Erland Sommarskog ! "Hon ligger med min b{ste v{n, ENEA Data, Stockholm ! jag v}gar inte sova l{ngre", Orup sommar@enea.UUCP ! ("She's making love with best friend, ! I dare not to sleep anymore")