From owner-freebsd-questions@FreeBSD.ORG Wed Nov 12 18:36:22 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 753B116A4CE for ; Wed, 12 Nov 2003 18:36:22 -0800 (PST) Received: from adsl-68-76-19-75.dsl.klmzmi.ameritech.net (adsl-68-76-19-75.dsl.klmzmi.ameritech.net [68.76.19.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 29EFE43FD7 for ; Wed, 12 Nov 2003 18:36:21 -0800 (PST) (envelope-from luke@foolishgames.com) Received: from [192.168.2.49] (adsl-67-36-58-31.dsl.klmzmi.ameritech.net [67.36.58.31]) (authenticated bits=0)ESMTP id hAD2aHxP064670; Wed, 12 Nov 2003 21:36:18 -0500 (EST) (envelope-from luke@foolishgames.com) X-Authentication-Warning: adsl-68-76-19-75.dsl.klmzmi.ameritech.net: Host adsl-67-36-58-31.dsl.klmzmi.ameritech.net [67.36.58.31] claimed to be [192.168.2.49] In-Reply-To: <200311130137.hAD1bUg02673@gateway.home> References: <200311130137.hAD1bUg02673@gateway.home> Mime-Version: 1.0 (Apple Message framework v606) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <2721593A-1582-11D8-BB00-0030656DD690@foolishgames.com> Content-Transfer-Encoding: 7bit From: Lucas Holt Date: Wed, 12 Nov 2003 21:36:15 -0500 To: "Marty Leisner" X-Mailer: Apple Mail (2.606) cc: Alex Kelly cc: freebsd-questions@freebsd.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 02:36:22 -0000 On Nov 12, 2003, at 8:37 PM, Marty Leisner wrote: > > > BTW -- I've been doing "object oriented" stuff in C for years -- > its harder, but its doable. You have a much simpler language > to deal with. > > First learn how to write good programs in C. > Then see if C++ buys you anything extra. > If it doesn't, you don't need C++. > But I've seen far too much C++ that's just obscure C. > > Just my experience and opinion. > > marty Am I missing something here? When does C have OO capability? Structs don't count. What about inheritance and polymorphism? To me a struct is like a VCR with no record button. You can view the content, but you can't manipulate it with the struct. If i want to do something to destroy the tape, I must apply a magnet from an outside source (much like a plain old function). And classes provide security, much like the tab on the front of the tape. The data is private if the tab is puched out. (ok thats a bad analogy) If C had OO features, then why do we have C++ and Objective C? I would agree that you can write programs that do the same thing in all three languages above, but I don't think that OO is a waste of time. OO promotes code reuse. That is the whole point. Using C++ implies a state of mind. You can write code like in C, but it defeats the purpose of using an OO language. Lucas Holt Luke@FoolishGames.com ________________________________________________________ FoolishGames.com (Jewel Fan Site) JustJournal.com (Free blogging) "Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." - Albert Einstein (1879-1955)