From owner-freebsd-questions@FreeBSD.ORG Tue Apr 20 13:45:07 2004 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 AACED16A51F for ; Tue, 20 Apr 2004 13:45:07 -0700 (PDT) Received: from lilzmailso02.liwest.at (lilzmailso02.liwest.at [212.33.55.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id 413EB43D3F for ; Tue, 20 Apr 2004 13:45:07 -0700 (PDT) (envelope-from dgw@liwest.at) Received: from cm217-96.liwest.at ([81.10.217.96]) by lilzmailso02.liwest.at with esmtp (Exim 4.24) id 1BG273-0006qt-2i; Tue, 20 Apr 2004 22:45:01 +0200 From: Daniela To: DoubleF Date: Tue, 20 Apr 2004 21:39:53 +0000 User-Agent: KMail/1.5.3 References: <200404151110.i3FBAaoo048373@adsl-68-76-19-75.dsl.klmzmi.ameritech.net> <200404171050.29467.dgw@liwest.at> <20040417123848.GA244@Shark.localdomain> In-Reply-To: <20040417123848.GA244@Shark.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200404202139.53518.dgw@liwest.at> cc: freebsd-questions@freebsd.org cc: Miles Lubin Subject: Re: Beginning C++ in FreeBSD 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: Tue, 20 Apr 2004 20:45:07 -0000 On Saturday 17 April 2004 12:38, DoubleF wrote: > On Sat, Apr 17, 2004 at 10:50:29AM +0000, > > Daniela probably wrote: > > On Friday 16 April 2004 21:52, Lucas Holt wrote: > > > > Why would one need C++ if it's converted to C anyway? > > > > > > C++ is useful for programmers that believe in object oriented > > > methodologies. Some things are easier to do in C++ as well. It all > > > depends on the programmer. > > > > > > You seem to favor assembly languages. I've found that many people into > > > assembly never seem to get OO and therefore languages like C++ and Java > > > make no sense to them. Assembly *can be* fast but its not portable. > > > C was created to make unix portable. C++ was created to add OO > > > features to C. (as was objective c) > > > > I do program in C++ quite often and it does make sense to me. I know > > seven programming languages and which one I use depends on the program, > > as I find them all easy. OO languages can be optimized differently than > > non-OO languages, and when you translate one language into another, this > > advantage gets lost. > > > > I would rather say, assembly is fast and can be portable, if it's done > > properly. Yes, it is an unforgiving language, but I think beginning > > programmers need exactly that. > > I don't think that assembly is the best language to learn first. English > is:) (I mean, reading the draft standards is a good idea; though they > can't be regarded as manuals, they have valuable examples and notes). > > Learning assembly has the added advantage of knowing (at least > basically) what happens when you do a dynamic_cast<>(), for instance. > Assembly doesn't have to be portable to be usable this educational way. > At least for me, this is necessary to be sure of what I'm doing in C++. > > This doesn't mean that to understand a C++ program, I have to convert it > to assembly:). It just means that, when I face a problem, I can dig into > the details and find out what I've done wrong, etc. OO means a high > level of abstraction, and if part of the levels are floating in the air > with nothing to support them, you sooner or later will face problems --- > the problems of your misunderstanding how it works. > > I don't mean you have to write every program in assembly, but if you > understand how it works --- it certainly helps. YMMV. That's basically what I was trying to say. Part of the reason why I love assembly is that I hate being limited and not being able to do *exactly* what I want. And if I want it to be fast ... I'd give up all the comforts of a high-level language even for no particular reason. Every programming language is fun and easy in it's own way. For me, ASM in not just a last resort.