Date: Wed, 12 Nov 2003 21:36:15 -0500 From: Lucas Holt <luke@foolishgames.com> To: "Marty Leisner" <leisner@rochester.rr.com> Cc: freebsd-questions@freebsd.org Subject: Re: Newbie: The C / C++ Issue Message-ID: <2721593A-1582-11D8-BB00-0030656DD690@foolishgames.com> In-Reply-To: <200311130137.hAD1bUg02673@gateway.home> References: <200311130137.hAD1bUg02673@gateway.home>
next in thread | previous in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2721593A-1582-11D8-BB00-0030656DD690>