Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | BGB <cr88192@hotmail.com> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Objects in C |
| Date | 2015-04-18 15:08 -0500 |
| Organization | albasani.net |
| Message-ID | <mgudri$cdv$1@news.albasani.net> (permalink) |
| References | <14aac167-b724-458d-80f2-cc7a300e1ff3@googlegroups.com> <mgu9oa$4nk$1@news.albasani.net> |
On 4/18/2015 2:02 PM, Jens Stuckelberger wrote:
> On Sat, 18 Apr 2015 10:26:32 -0700, David Kleinecke wrote:
>
>> After all these years uncertainty still reigns about what
>> object-oriented computing is all about.
>
> It was supposed to be a silver bullet - you know, solve all
> possible programming issues, make code clean, clear and easy to
> understand, prevent people from reinventing the wheel, give you fresh,
> minty breath, make you irresistible to desirable members of your selected
> sex, the works.
>
> Reality put it in its place - good for some undertakings (e.g.
> graphics) but just another paradigm for the rest. Some people swear by
> it; just as many hate it with passion.
>
and other people swear by "OO languages", taking Java as a golden
example, yet there is little really in Java on this front that can't be
done in C with structs and function-pointers (yes, including things like
interfaces and 'instanceof' and similar...).
of course, a nicer model for mapping OO to C is doing it more like in
Common Lisp, but then people object that this is not OO, as:
BaseClass_DoSomething(obj, ...);
doesn't really look anything like:
obj.doSomething(...);
or:
obj->DoSomething(...);
as, this pretty much just looks like normal C code (and internally
usually just forwards the call to the appropriate vtable entry).
other differences is people can balk when you do your interfaces like:
IFoo **foo;
foo=&obj->iFoo;
(*foo)->DoSomething(...);
rather than something like:
IFoo foo;
foo=(IFoo)obj;
foo.doSomething(...);
of course, what may be overlooked, is that structs and function pointers
allow doing a lot of things, and a lot more efficiently, that would be a
bit ugly and awkward if shoved into the traditional class/instance OO mold.
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Objects in C David Kleinecke <dkleinecke@gmail.com> - 2015-04-18 10:26 -0700
Objects in C asetofsymbols@gmail.com - 2015-04-18 10:54 -0700
Objects in C asetofsymbols@gmail.com - 2015-04-18 11:52 -0700
Re: Objects in C Jens Stuckelberger <Jens_Stuckelberger@nowhere.net> - 2015-04-18 19:02 +0000
Re: Objects in C BGB <cr88192@hotmail.com> - 2015-04-18 15:08 -0500
Re: Objects in C BGB <cr88192@hotmail.com> - 2015-04-18 16:46 -0500
Re: Objects in C Keith Thompson <kst-u@mib.org> - 2015-04-18 15:41 -0700
Re: Objects in C August Karlstrom <fusionfile@gmail.com> - 2015-04-19 11:48 +0200
Re: Objects in C BGB <cr88192@hotmail.com> - 2015-04-19 09:32 -0500
Re: Objects in C Keith Thompson <kst-u@mib.org> - 2015-04-19 07:55 -0700
Re: Objects in C David Kleinecke <dkleinecke@gmail.com> - 2015-04-19 09:27 -0700
Re: Objects in C Johannes Bauer <dfnsonfsduifb@gmx.de> - 2015-04-19 20:52 +0200
Re: Objects in C BGB <cr88192@hotmail.com> - 2015-04-19 16:01 -0500
Re: Objects in C David Kleinecke <dkleinecke@gmail.com> - 2015-04-20 10:50 -0700
Re: Objects in C Johannes Bauer <dfnsonfsduifb@gmx.de> - 2015-04-20 22:49 +0200
Re: Objects in C Keith Thompson <kst-u@mib.org> - 2015-04-19 13:54 -0700
Re: Objects in C Johannes Bauer <dfnsonfsduifb@gmx.de> - 2015-04-19 23:05 +0200
Re: Objects in C David Kleinecke <dkleinecke@gmail.com> - 2015-04-20 10:53 -0700
Re: Objects in C Johannes Bauer <dfnsonfsduifb@gmx.de> - 2015-04-20 22:47 +0200
Re: Objects in C David Kleinecke <dkleinecke@gmail.com> - 2015-04-19 10:14 -0700
Re: Objects in C raltbos@xs4all.nl (Richard Bos) - 2015-04-20 10:25 +0000
Re: Objects in C David Kleinecke <dkleinecke@gmail.com> - 2015-04-20 10:58 -0700
Re: Objects in C Johannes Bauer <dfnsonfsduifb@gmx.de> - 2015-04-19 12:47 +0200
Re: Objects in C David Kleinecke <dkleinecke@gmail.com> - 2015-04-19 09:53 -0700
Re: Objects in C Johannes Bauer <dfnsonfsduifb@gmx.de> - 2015-04-19 19:19 +0200
Re: Objects in C David Kleinecke <dkleinecke@gmail.com> - 2015-04-19 09:43 -0700
Re: Objects in C David Kleinecke <dkleinecke@gmail.com> - 2015-04-20 10:37 -0700
Re: Objects in C David Kleinecke <dkleinecke@gmail.com> - 2015-04-20 10:41 -0700
Re: Objects in C Tim Rentsch <txr@alumni.caltech.edu> - 2015-04-22 11:50 -0700
Re: Objects in C David Kleinecke <dkleinecke@gmail.com> - 2015-04-23 10:02 -0700
Re: Objects in C Chad <cdalten@gmail.com> - 2015-04-23 11:12 -0700
Re: Objects in C Chad <cdalten@gmail.com> - 2015-04-23 12:10 -0700
Re: Objects in C Tim Rentsch <txr@alumni.caltech.edu> - 2015-04-25 02:31 -0700
Re: Objects in C David Kleinecke <dkleinecke@gmail.com> - 2015-04-25 10:19 -0700
Re: Objects in C Tim Rentsch <txr@alumni.caltech.edu> - 2015-04-26 08:45 -0700
Re: Objects in C David Kleinecke <dkleinecke@gmail.com> - 2015-04-27 08:37 -0700
Re: Objects in C Tim Rentsch <txr@alumni.caltech.edu> - 2015-04-28 08:27 -0700
Re: Objects in C David Kleinecke <dkleinecke@gmail.com> - 2015-04-28 08:59 -0700
Re: Objects in C Tim Rentsch <txr@alumni.caltech.edu> - 2015-04-30 07:32 -0700
Re: Objects in C David Kleinecke <dkleinecke@gmail.com> - 2015-04-30 09:19 -0700
Re: Objects in C Tim Rentsch <txr@alumni.caltech.edu> - 2015-05-01 04:21 -0700
Re: Objects in C David Kleinecke <dkleinecke@gmail.com> - 2015-05-01 10:37 -0700
Re: Objects in C Tim Rentsch <txr@alumni.caltech.edu> - 2015-05-03 10:54 -0700
Re: Objects in C "Chris M. Thomasson" <cristom@charter.net> - 2015-05-03 12:19 -0700
Re: Objects in C Tim Rentsch <txr@alumni.caltech.edu> - 2015-05-03 13:45 -0700
Re: Objects in C "Chris M. Thomasson" <cristom@charter.net> - 2015-05-03 13:58 -0700
Re: Objects in C Tim Rentsch <txr@alumni.caltech.edu> - 2015-05-05 05:56 -0700
Re: Objects in C "Chris M. Thomasson" <cristom@charter.net> - 2015-05-06 16:09 -0700
Re: Objects in C Tim Rentsch <txr@alumni.caltech.edu> - 2015-05-06 19:30 -0700
Re: Objects in C "Chris M. Thomasson" <cristom@charter.net> - 2015-05-03 14:02 -0700
Re: Objects in C David Kleinecke <dkleinecke@gmail.com> - 2015-05-04 12:21 -0700
Re: Objects in C "Chris M. Thomasson" <cristom@charter.net> - 2015-05-06 16:39 -0700
Re: Objects in C David Kleinecke <dkleinecke@gmail.com> - 2015-05-07 12:59 -0700
Re: Objects in C "Chris M. Thomasson" <cristom@charter.net> - 2015-05-09 12:42 -0700
Re: Objects in C David Kleinecke <dkleinecke@gmail.com> - 2015-05-10 11:15 -0700
Re: Objects in C luser droog <luser.droog@gmail.com> - 2015-04-25 13:37 -0700
Re: Objects in C Tim Rentsch <txr@alumni.caltech.edu> - 2015-04-26 07:13 -0700
Re: Objects in C David Kleinecke <dkleinecke@gmail.com> - 2015-04-26 08:40 -0700
Re: Objects in C Tim Rentsch <txr@alumni.caltech.edu> - 2015-04-28 08:23 -0700
Re: Objects in C David Kleinecke <dkleinecke@gmail.com> - 2015-04-26 08:07 -0700
Re: Objects in C David Kleinecke <dkleinecke@gmail.com> - 2015-04-19 10:13 -0700
Re: Objects in C "Chris M. Thomasson" <cristom@charter.net> - 2015-04-20 12:49 -0700
Re: Objects in C "Chris M. Thomasson" <cristom@charter.net> - 2015-04-23 16:13 -0700
Re: Objects in C David Kleinecke <dkleinecke@gmail.com> - 2015-04-24 09:58 -0700
Re: Objects in C "Chris M. Thomasson" <cristom@charter.net> - 2015-04-24 19:14 -0700
Re: Objects in C "Chris M. Thomasson" <cristom@charter.net> - 2015-04-25 22:13 -0700
Re: Objects in C David Kleinecke <dkleinecke@gmail.com> - 2015-04-26 08:40 -0700
Re: Objects in C Tim Rentsch <txr@alumni.caltech.edu> - 2015-04-22 11:44 -0700
csiph-web