From owner-freebsd-current Thu Jan 18 7: 5:54 2001 Delivered-To: freebsd-current@freebsd.org Received: from hda.hda.com (host65.hda.com [63.104.68.65]) by hub.freebsd.org (Postfix) with ESMTP id C394337B402 for ; Thu, 18 Jan 2001 07:05:32 -0800 (PST) Received: (from dufault@localhost) by hda.hda.com (8.11.1/8.11.1) id f0IF1PK50877; Thu, 18 Jan 2001 10:01:25 -0500 (EST) (envelope-from dufault) From: Peter Dufault Message-Id: <200101181501.f0IF1PK50877@hda.hda.com> Subject: Re: HEADS UP: I386_CPU In-Reply-To: from Dag-Erling Smorgrav at "Jan 18, 2001 03:17:28 pm" To: Dag-Erling Smorgrav Date: Thu, 18 Jan 2001 10:01:25 -0500 (EST) Cc: Will Andrews , Warner Losh , FreeBSD Current X-Mailer: ELM [version 2.4ME+ PL61 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Will Andrews writes: > > Well, Warner, I've never done embedded systems. So, tell me, do they > > actually use any C++ code in embedded systems? C++ has a rather high > > overhead as far as disk space & memory goes. > > That's a myth. > > > I would imagine that 99%+ > > of embedded systems do not use C++ code except perhaps for a very small > > amount of the code. > > >From experience, I would imagine the reverse. OK, I'll pipe up. 1. I can't agree with you about the reverse, that 99% is C++ and 1% C, much more can and should be done in C++, and 2. When you know what you're doing there is no additional overhead in time and space using C++ versus C. Also, you won't be screwing around creating large amounts of messy "class code" housekeeping in C. I think the kernel could benefit from restricted C++ support. However, 3. Far too many people don't know at all what they're doing. One of the first things I noticed on a recent project was I couldn't compile and run it in simulation without running out of swap because objects representing the system memory map were being accidentally created but not referenced. C is much more forgiving of ignorance. Peter -- Peter Dufault (dufault@hda.com) Realtime development, Machine control, HD Associates, Inc. Fail-Safe systems, Agency approval To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message