Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #3394
| From | "osmium" <r124c4u102@comcast.net> |
|---|---|
| Newsgroups | comp.programming |
| Subject | Re: Object oriented programming? |
| Date | 2013-05-30 10:49 -0500 |
| Message-ID | <b0pao6F5jrmU1@mid.individual.net> (permalink) |
| References | <ko5341$heu$1@news.albasani.net> <d63ebecf-90b4-407d-9d81-d9b5ff54d505@s8g2000vbw.googlegroups.com> <ko7mf9$qq8$3@news.albasani.net> |
root wrote: > What types of programs lend themselves to OOP and what don't? Data base oriented programs surely lend themselves. You can have a reusable stack, linked list, tree, etc. Reusable being the key. In this case someone has already written these fundamental thingies and incorporated them in the System Template Library, STL. And STL is a fundamental part of C++. I think the best way to get started is to write your own string class. There is one in the STL, but writing your own is a big learning aid. A string class is a type on steroids, whereas a C int is wimpy by comparison. It will probably take a week or so to write, I actually did this and got it seriously wrong on my first pass. . A vector class is a nice illustration, too, and easier. Theorizing just (often) leads to snow jobs as you have already observed. As far as what *don't* lend themselves, that is a much harder question. IMO OOP is overused. If you give someone a toolmaker's microscope they will use it. Even if they are a plumber. Be warned that C++ has a lot of stuff that isn't OOP, I think the method was "As long as we've got the hood off, let's really tune this baby up." I'm thinking of function overloading, operator overloading, templates plus more I am too lazy to come up with. If you use '+' for string concatenation, you are using operator overloading. You could live without it. And since concatenation is not commutative, purity is not harmed. It is easy to get carried away. If I had more energy I would write a program to support a fictitious library. I think OOP lends itself nicely to this, and it is open ended enough that I think one person could die before he finished it. And since the spec is his, he can follow where his interest are. OOP is nice, but it is FAR from a silver bullet.
Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Object oriented programming? root <NoEMail@home.org> - 2013-05-29 14:25 +0000
Re: Object oriented programming? Melzzzzz <mel@zzzzz.com> - 2013-05-29 18:19 +0200
Re: Object oriented programming? root <NoEMail@home.org> - 2013-05-30 13:51 +0000
Re: Object oriented programming? Melzzzzz <mel@zzzzz.com> - 2013-05-30 19:48 +0200
Re: Object oriented programming? Patricia Shanahan <pats@acm.org> - 2013-05-29 09:21 -0700
Re: Object oriented programming? root <NoEMail@home.org> - 2013-05-30 13:56 +0000
Re: Object oriented programming? James Harris <james.harris.1@gmail.com> - 2013-05-29 13:05 -0700
Re: Object oriented programming? root <NoEMail@home.org> - 2013-05-30 14:07 +0000
Re: Object oriented programming? "osmium" <r124c4u102@comcast.net> - 2013-05-30 10:49 -0500
Re: Object oriented programming? James Harris <james.harris.1@gmail.com> - 2013-06-01 12:18 -0700
Re: Object oriented programming? Kicer <a@b.c> - 2013-05-29 22:13 +0200
Re: Object oriented programming? root <NoEMail@home.org> - 2013-05-30 14:22 +0000
Re: Object oriented programming? Kicer <a@b.c> - 2013-06-01 02:54 +0200
Re: Object oriented programming? Patricia Shanahan <pats@acm.org> - 2013-06-01 07:43 -0700
Re: Object oriented programming? Kicer <a@b.c> - 2013-06-05 18:16 +0200
Re: Object oriented programming? rugxulo@gmail.com - 2013-05-30 22:22 -0700
Re: Object oriented programming? root <NoEMail@home.org> - 2013-05-31 14:05 +0000
Re: Object oriented programming? "Charles Hottel" <chottel@earthlink.net> - 2013-05-31 12:12 -0400
Re: Object oriented programming? root <NoEMail@home.org> - 2013-05-31 20:31 +0000
Re: Object oriented programming? "BartC" <bc@freeuk.com> - 2013-06-01 00:59 +0100
Re: Object oriented programming? Willem <willem@turtle.stack.nl> - 2013-06-01 07:54 +0000
Re: Object oriented programming? Jongware <jongware@no-spam.plz> - 2013-06-07 11:05 +0200
Re: Object oriented programming? Paul N <gw7rib@aol.com> - 2013-06-02 13:11 -0700
Re: Object oriented programming? Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2013-06-03 11:06 -0700
csiph-web