Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #3395
| From | Melzzzzz <mel@zzzzz.com> |
|---|---|
| Newsgroups | comp.programming |
| Subject | Re: Object oriented programming? |
| Date | 2013-05-30 19:48 +0200 |
| Organization | albasani.net |
| Message-ID | <ko83cn$p4r$1@news.albasani.net> (permalink) |
| References | <ko5341$heu$1@news.albasani.net> <ko59r4$36h$2@news.albasani.net> <ko7lgs$qq8$1@news.albasani.net> |
On Thu, 30 May 2013 13:51:24 +0000 (UTC) root <NoEMail@home.org> wrote: > Melzzzzz <mel@zzzzz.com> wrote: > > > > You would program in same way except that you write objects > > and methods instead of structures and functions/procedures. > > Method is function that has first parameter structure/object. > > Difference is that you could write polymorphic objects, > > those with virtual functions (runtime dispatch on type), but than > > again perhaps it is not necessary in your case. > > All in all program logic is same... > > > > Thanks for responding, but your comments are incomprehensible to > me. Can you translate them into examples with respect to > my text editor example? For instance, what would an object > be if you were writing a text editor? How many data structures you have? Each data structure can be object. vi is mostly line > oriented, would an object be a line of text? I don;t really know if that would be useful. > > If an object were a line of text, then would one method > be something like: > MoveLineMethod (line, from place, to place) Yes, but again with OOP you have to simplify , not complicate. Again you can recognize in your program what objects would be. > > to move the line from one place to another? Is > that something like you describe? Yes. it would be line.Move(fromplace,toplace), but than again you could have text object, which is collection of lines, and then text.Move(line,fromplace,toplace) You may recognize in your program what are objects (I guess you have data structures already).
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