From owner-freebsd-questions@FreeBSD.ORG Thu Nov 13 11:39:54 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2BCA916A4CE for ; Thu, 13 Nov 2003 11:39:54 -0800 (PST) Received: from catseye.mine.nu (d154-5-164-0.bchsia.telus.net [154.5.164.0]) by mx1.FreeBSD.org (Postfix) with SMTP id 66F4743F3F for ; Thu, 13 Nov 2003 11:39:53 -0800 (PST) (envelope-from catseye@catseye.mine.nu) Received: (qmail 42892 invoked by uid 1001); 13 Nov 2003 19:42:40 -0000 Date: Thu, 13 Nov 2003 11:42:40 -0800 From: Chris Pressey To: "abowhill" Message-Id: <20031113114240.29717b03.cpressey@catseye.mine.nu> In-Reply-To: <20031113190115.C2F7733C5B@mail.blarg.net> References: <20031113190115.C2F7733C5B@mail.blarg.net> Organization: Cat's Eye Technologies X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; i386-portbld-freebsd4.9) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org cc: leblanc@keyslapper.org Subject: Re: Newbie: The C / C++ Issue X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2003 19:39:54 -0000 On Thu, 13 Nov 2003 11:01:54 -0800 "abowhill" 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