Date: Thu, 13 Nov 2003 11:42:40 -0800 From: Chris Pressey <cpressey@catseye.mine.nu> To: "abowhill" <abowhill@blarg.net> Cc: leblanc@keyslapper.org Subject: Re: Newbie: The C / C++ Issue Message-ID: <20031113114240.29717b03.cpressey@catseye.mine.nu> In-Reply-To: <20031113190115.C2F7733C5B@mail.blarg.net> References: <20031113190115.C2F7733C5B@mail.blarg.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 13 Nov 2003 11:01:54 -0800 "abowhill" <abowhill@blarg.net> wrote: > > Am I missing something here? When does C have OO capability? > > Structs don't count. What about inheritance and polymorphism? > > >>That's in the implementation AND application. Just because you CAN > >>access part of a lowly struct, doesn't mean you have to. It's > >object>oriented if you OBSERVE the restricted accesses defined by OO. > >>Whether or not they're there is completely irrelevant. Of course C > >>has OO capability, it just doesn't have its restrictions :) > > The idea that C can be used to do object-oriented programming is > a myth. The C language is not object-oriented or even object-based. > The big reason C++ is object-oriented is due to dynamic binding. I don't think I buy that. With that reasoning, couldn't you say that any program in any language that does any sort of dynamic binding (for example, opening a .so file) "is object-oriented"? The way I see it is that object-orientation is a methodology, and languages aren't methodologies, so it's absurd to say that some language "is" or "isn't" object-oriented. (I mean, we all know that the Bourne shell "is object-oriented,"[1] right? :) The best you can do is to describe the degree to which some language supports or enforces object-oriented programming. Incidental to that, C++ provides many abstractions which support object-oriented programming, while not enforcing them in any way. But this is getting far off topic for this list; the bare facts remain: - much of FreeBSD (kernel, userland) is written in C - many FreeBSD ports are written in C++ So, as stated several times now, it really depends on what you want to work on. -Chris [1] http://www.usenix.org/publications/library/proceedings/bos94/haemer.html
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031113114240.29717b03.cpressey>