From owner-freebsd-hackers Wed Mar 6 7:31:27 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from tepid.osl.fast.no (tepid.osl.fast.no [213.188.9.130]) by hub.freebsd.org (Postfix) with ESMTP id B425437B400 for ; Wed, 6 Mar 2002 07:31:18 -0800 (PST) Received: from raw.grenland.fast.no.fast.no (raw.grenland.fast.no [192.168.48.104]) by tepid.osl.fast.no (8.9.3/8.9.1) with ESMTP id QAA07124; Wed, 6 Mar 2002 16:31:05 +0100 (CET) (envelope-from Raymond.Wiker@fast.no) From: Raymond Wiker MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15494.13878.219807.949085@raw.grenland.fast.no> Date: Wed, 6 Mar 2002 16:31:02 +0100 To: Giorgos Keramidas Cc: Terry Lambert , "Steve B." , freebsd-hackers@FreeBSD.ORG Subject: Re: C vs C++ In-Reply-To: <20020306032029.GA7926@hades.hell.gr> References: <20020305132457.A4700-100000@alpha.yumyumyum.org> <001701c1c481$d0d5eab0$f642d9cf@DROID> <20020305231252.GC5328@hades.hell.gr> <3C8568E0.76415D99@mindspring.com> <20020306032029.GA7926@hades.hell.gr> X-Mailer: VM 7.00 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Giorgos Keramidas writes: > On 2002-03-05 16:54, Terry Lambert wrote: > > Giorgos Keramidas wrote: > > > The steeper learning curve of C++ is indeed steeper, not because of > > > some magic property of the object-oriented programming paradigm, but > > > because there are a lot more things to learn, before a complete > > > program can be written, IMHO. > > > > Uh... "Hello World" looks the same in ANSI C and C++, unless > > you insist on using I/O streams and "cout", which no one ever > > really does, unless they are writing a C++ book or trying to > > impress a student. > > Well, to be frank, I've seen a few C++ coding style documents, that suggest > avoiding altogether when writing in C++. The fact that parts of > the C++ libraries already use the I/O stream classes, which have their own > buffers, combined with the buffered I/O that does by default, > can and usually does result in all hell being let loose. I assume you mean ? Anyway, I *really* can't see any reason not to use , , and friends. I also cannot see any reason not to use exceptions, the standard containers, the string classes etc. Used properly, these make it possible to write code that is inherently safer than anything built around printf/scanf, char *, longjump, etc. Without these (and a few others) you may just as well stay with standard C. Then again, if you want to do object-oriented programming, C++ is probably not the right choice. If you want to use several different paradigms simulataneously in one language, C++ may be a better fit - although Common Lisp is a much better choice :-) //Raymond. -- Raymond Wiker Mail: Raymond.Wiker@fast.no Senior Software Engineer Web: http://www.fast.no/ Fast Search & Transfer ASA Phone: +47 23 01 11 60 P.O. Box 1677 Vika Fax: +47 35 54 87 99 NO-0120 Oslo, NORWAY Mob: +47 48 01 11 60 Try FAST Search: http://alltheweb.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message