Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #30687
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Martin Gregorie <martin@address-in-sig.invalid> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Which data structure would you recommend? |
| Date | Mon, 12 Jan 2015 14:35:44 +0000 (UTC) |
| Organization | A noiseless patient Spider |
| Lines | 67 |
| Message-ID | <m90m40$2lh$1@dont-email.me> (permalink) |
| References | <aa6da1b0-009b-4eb9-aa30-a289c9d94874@googlegroups.com> <tree-20150108234524@ram.dialup.fu-berlin.de> <54b0001d$0$2902$e4fe514c@news.xs4all.nl> <m8uhee$fi6$1@news.m-online.net> <m8uvgl$ksb$1@dont-email.me> <54b3902d$0$2974$e4fe514c@news.xs4all.nl> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | 8bit |
| Injection-Date | Mon, 12 Jan 2015 14:35:44 +0000 (UTC) |
| Injection-Info | mx02.eternal-september.org; posting-host="e5160e2be48f1ea550cf61512446f525"; logging-data="2737"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+nTcKNvpYCahdDake67nmHvdSqiq55Dhs=" |
| User-Agent | Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) |
| Cancel-Lock | sha1:paEv39y4o6nRd3bKvrc4rhho6sI= |
| Xref | csiph.com comp.lang.java.programmer:30687 |
Show key headers only | View raw
On Mon, 12 Jan 2015 10:13:17 +0100, Silvio wrote: > On 01/12/2015 12:03 AM, Martin Gregorie wrote: >> On Sun, 11 Jan 2015 20:03:42 +0100, Magnus Warker wrote: >> >>> On 01/09/2015 05:21 PM, Silvio wrote: >>> >>>> I hate the idea that something is OOP or not or that OOP defines the >>>> one and only way a thing can/should look. OOP does NOT mean anything >>>> on its own and at the same time means many different things in the >>>> minds of different people. >>> >>> I strongly agree! >>> >>> Your words remind me of a time, when some people thought, their C code >>> would be OOP when saved in files ending with "cpp". :-) >>> >> And there's still a huge amount of 'C++' code around that is in reality >> little more than ANSI C with // comments, a .cpp extension and nary a >> class declaration to be seen. Quite depressing, really, if its a valid >> indication of the state of the programming art. >> >> >> > True, I have come across such code bases as well and it has not always > been pleasant. > > On the other hand I have come across lots of programs that where written > in very strict OOP patterns that where absolute abominations as well. > And some of the most brilliant and ingeniously written programs I have > ever encountered where written in procedural C (and done in a very > structured and consistent way). > > My point is that the level of OOP-ness (which is a subjective score on > its own) does not equal the quality of a program. Doing everything the > "proper" OOP way, putting in the right tests, etc. is easy. Writing good > programs is an art. Good points and well made. Depending on what the program's purpose is, I agree that a well structured and commented ANSI C program can sometimes be easier to understand than its OO equivalent. IME the one place where OO provides a clear win over well-structured non- OO programming is in code re-usability. Its generally easier to write a re-usable set of classes, and often easier to enhance/extend them too, than it is to do the same job in vanilla C or equivalent languages. I, anyway, tend to end up writing C library code in a semi-OO way. I put instance-related variables in typedefed structs (think FILE in standard C) that are created and destroyed with malloc/free. Global variables are accessable only from within the source module that contains them and all all the functions that provide the set of closely related actions. FWIW I was using this style, self-taught, before my first brush with either C++ or Java, but both Wirth's "Algorithms + Data Structures = Programs" and Kernighan & Plauger's "Software Tools In Pascal" were very influential in developing my personal programming style. -- martin@ | Martin Gregorie gregorie. | Essex, UK org |
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Which data structure would you recommend? Doug Mika <dougmmika@gmail.com> - 2015-01-08 14:25 -0800
Re: Which data structure would you recommend? Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-01-08 17:51 -0500
Re: Which data structure would you recommend? Silvio <silvio@internet.com> - 2015-01-09 17:21 +0100
Re: Which data structure would you recommend? Magnus Warker <magnux@mailinator.com> - 2015-01-11 20:03 +0100
Re: Which data structure would you recommend? Martin Gregorie <martin@address-in-sig.invalid> - 2015-01-11 23:03 +0000
Re: Which data structure would you recommend? Lew <lewbloch@gmail.com> - 2015-01-11 15:17 -0800
Re: Which data structure would you recommend? Silvio <silvio@internet.com> - 2015-01-12 15:05 +0100
Re: Which data structure would you recommend? Silvio <silvio@internet.com> - 2015-01-12 10:13 +0100
Re: Which data structure would you recommend? Martin Gregorie <martin@address-in-sig.invalid> - 2015-01-12 14:35 +0000
Re: Which data structure would you recommend? Gene Wirchenko <genew@telus.net> - 2015-01-13 10:02 -0800
Re: Which data structure would you recommend? Arne Vajhøj <arne@vajhoej.dk> - 2015-01-19 20:11 -0500
Re: Which data structure would you recommend? Gene Wirchenko <genew@telus.net> - 2015-01-20 09:25 -0800
Re: Which data structure would you recommend? Silvio <silvio@internet.com> - 2015-01-12 08:58 +0100
Re: Which data structure would you recommend? Silvio <silvio@internet.com> - 2015-01-12 14:54 +0100
Re: Which data structure would you recommend? Jeff Higgins <jeff@invalid.invalid> - 2015-01-09 18:36 -0500
Re: Which data structure would you recommend? Jeff Higgins <jeff@invalid.invalid> - 2015-01-09 19:54 -0500
Which data structure would you recommend? ynseo <yeori.seo@gmail.com> - 2015-01-12 04:52 -0800
csiph-web