From owner-freebsd-questions@FreeBSD.ORG Wed Nov 12 22:46:19 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 3DFC816A4CE for ; Wed, 12 Nov 2003 22:46:19 -0800 (PST) Received: from ms-smtp-02.nyroc.rr.com (ms-smtp-02-qfe0.nyroc.rr.com [24.24.2.56]) by mx1.FreeBSD.org (Postfix) with ESMTP id 17B0543FDF for ; Wed, 12 Nov 2003 22:46:18 -0800 (PST) (envelope-from leisner@rochester.rr.com) Received: from gateway.home (roc-24-93-18-140.rochester.rr.com [24.93.18.140]) hAD6kA3F014504; Thu, 13 Nov 2003 01:46:10 -0500 (EST) Received: from gateway (leisner@localhost) by gateway.home (8.11.6/8.9.3) with ESMTP id hAD6kAw04271; Thu, 13 Nov 2003 01:46:10 -0500 Message-Id: <200311130646.hAD6kAw04271@gateway.home> X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Lucas Holt In-Reply-To: Message from Lucas Holt <2721593A-1582-11D8-BB00-0030656DD690@foolishgames.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 13 Nov 2003 01:46:10 -0500 From: "Marty Leisner" X-Virus-Scanned: Symantec AntiVirus Scan Engine 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 06:46:19 -0000 My take on computer science (which is an oxymoron) is this: Researchers look at successful programmers and try to figure out what they're doing. In the 70s, it was "structured programming". In the late 80s it was "object oriented". You can manipulate the data with a struct -- put in function pointers to methods -- which is a crude way to do polymorphism. Don't forget -- cfront translated C++ into C code... OO doesn't promote reuse -- good design promotes reuse. I've been reusing code for years. I'm like Will Tracz -- a used program salesman ;-) I've reused a lot of procedural code. One of my coworkers took a C++ course, renamed her "structs" to "classes" and thought she was doing object-oriented stuff...please...!! The bottom line is can other people understand your program. What I've seen is you have far less of a chance in C++ than in C. I've recently read Stroustrup's book and got more involved in C++ -- it seems the principle of least surprise was thrown out the window. marty