Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #13647
| From | glen herrmannsfeldt <gah@ugcs.caltech.edu> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Learning Java |
| Date | 2012-04-18 21:10 +0000 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <jmnaju$3fu$1@speranza.aioe.org> (permalink) |
| References | (1 earlier) <jmknim$mlo$1@dont-email.me> <jmkojn$asd$1@speranza.aioe.org> <bBnjr.1802$yC6.1600@newsfe08.iad> <4f8e21b4$0$293$14726298@news.sunsite.dk> <Nrwjr.2990$ay5.1551@newsfe14.iad> |
Arved Sandstrom <asandstrom3minus1@eastlink.ca> wrote: (snip, someone wrote) >>> the principles and theory of OOP; one simply has to remember >>> that much real-world code deviates substantially. >> OOP is supposed to be imperative, so I do not see much >> point in that argument. > OOP isn't "supposed" to be imperative at all, it just happens that most > mainstream OO languages are. C++, Objective-C, Java etc, those are > imperative OO languages. But you can and do have languages that are > functional and use OO, even some that are logical and have elements of OO. But also, I believe, that there is an appropriate amount of OO-ness. Especially for computationally intensive algorithms, the inner loops should avoid creation of objects. Like just about everything, OO can be over done. > To the extent that OO != imperative I don't withdraw my use of the term > "imperative". But I really meant "procedural", and should have used that > across the board. > However, let's stick to the imperative OO languages here. My argument is > that a great deal of actual (non-teaching) Java code strays > substantially from best-practice OO, and is best characterized as > "procedural" and/or "structured" and/or "modular". It doesn't really > have those extra features that distinguish good OO code. Well, first of all, as I understand it the big advantage of OO is readability. But even so, too much of a good thing isn't always good. If something is more readable in procedural form, then do it that way! There are procedures (usually in non-OO languages) that are thousands, maybe tens of thousands of lines long. But there is a size that is easily understood by a good programmer, maybe in the 100 line range, and one shouldn't necessarily get smaller than that, just for OO sake. Now, the other reason for OO is for extensibility, and sometimes that will require an object where it otherwise might not be needed. > That is the main argument I am making. And it's about "what is", as a > caution to the OP, not a reflection on the best Java or even decent Java > that can be written by a programmer who is reasonably well-grounded in > proper OO. I am pointing out what we often see. -- glen
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Learning Java Steve Graham <jsgrahamus@yahoo.com> - 2012-04-17 15:03 -0600
Re: Learning Java markspace <-@.> - 2012-04-17 14:33 -0700
Re: Learning Java glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-04-17 21:50 +0000
Re: Learning Java Arne Vajhøj <arne@vajhoej.dk> - 2012-04-17 19:21 -0400
Re: Learning Java markspace <-@.> - 2012-04-17 16:47 -0700
Re: Learning Java glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-04-18 02:30 +0000
Re: Learning Java Arne Vajhøj <arne@vajhoej.dk> - 2012-04-28 21:56 -0400
Re: Learning Java Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-04-17 21:07 -0300
Re: Learning Java Arne Vajhøj <arne@vajhoej.dk> - 2012-04-17 22:06 -0400
Re: Learning Java Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-04-18 07:11 -0300
Re: Learning Java Leif Roar Moldskred <leifm@dimnakorr.com> - 2012-04-18 06:47 -0500
Re: Learning Java Lew <lewbloch@gmail.com> - 2012-04-18 10:19 -0700
Re: Learning Java Lew <lewbloch@gmail.com> - 2012-04-18 10:20 -0700
Re: Learning Java glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-04-18 21:10 +0000
Re: Learning Java Gene Wirchenko <genew@ocis.net> - 2012-04-18 15:01 -0700
Re: Learning Java Arne Vajhøj <arne@vajhoej.dk> - 2012-04-28 22:11 -0400
Re: Learning Java Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-04-29 11:00 -0300
Re: Learning Java Lew <noone@lewscanon.com> - 2012-04-29 11:44 -0700
Re: Learning Java markspace <-@.> - 2012-04-29 16:34 -0700
Re: Learning Java Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-04-30 20:52 -0300
Re: Learning Java Arne Vajhøj <arne@vajhoej.dk> - 2012-05-05 18:17 -0400
Re: Learning Java Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-05-06 15:49 -0300
Re: Learning Java Gene Wirchenko <genew@ocis.net> - 2012-05-07 09:50 -0700
Re: Learning Java RedGrittyBrick <RedGrittyBrick@spamweary.invalid> - 2012-04-19 15:30 +0100
Re: Learning Java Arne Vajhøj <arne@vajhoej.dk> - 2012-04-17 19:26 -0400
Re: Learning Java Patricia Shanahan <pats@acm.org> - 2012-04-17 19:08 -0700
Re: Learning Java Roedy Green <see_website@mindprod.com.invalid> - 2012-04-26 16:06 -0700
Re: Learning Java Steve Graham <jsgrahamus@yahoo.com> - 2012-05-15 17:40 -0600
csiph-web