From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 11 19:00:40 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A50C616A4DD for ; Tue, 11 Jul 2006 19:00:40 +0000 (UTC) (envelope-from nitro@263.net) Received: from smtp.263.net (263.net.cn [211.150.96.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id DC69343D7F for ; Tue, 11 Jul 2006 19:00:35 +0000 (GMT) (envelope-from nitro@263.net) Received: from origin.intron.ac (unknown [127.0.0.1]) by smtp.263.net (Postfix) with ESMTP id 04785F15B6 for ; Wed, 12 Jul 2006 03:00:34 +0800 (CST) X-KSVirus-check: 0 References: <1152540567.99616@origin.intron.ac> <44B2AE69.4080703@elischer.org> <44B2D2DF.2000401@sh.cvut.cz> <20060711.101403.-928138940.imp@bsdimp.com> In-Reply-To: <20060711.101403.-928138940.imp@bsdimp.com> From: mag@intron.ac To: "M. Warner Losh" Date: Wed, 12 Jul 2006 02:57:20 +0800 Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312"; format=flowed Content-Transfer-Encoding: 7bit Message-Id: <1152644432.30488@origin.intron.ac> X-Mailman-Approved-At: Wed, 12 Jul 2006 00:08:09 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: kern/99979: Get Ready for Kernel Module in C++ X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jul 2006 19:00:40 -0000 M. Warner Losh wrote: > In message: <44B2D2DF.2000401@sh.cvut.cz> > V lav Haisman writes: > : Deciding that some features are bad beforehand, before you evaluate them > : is IMO bad idea. Let interested people write a bunch of C++ modules with > : the complete language before deciding on what shouldn't be used. > > There's actually a fair amount of experience with people doing C++ in > FreeBSD kernels. People have been doing things with it for about 8 > years now. There are significant performance issues with even C code > compiled as C++. It is possible to write fast C++ for kernel work, > but it is also very easy to write really bad C++ for kernel work. > Easier than bad C code. Currently, GNU CC has made great advance in binary code execution efficiency. And Intel C++ Compiler is also an excellent one. We can evaluate them by assemble code generated by them. I would repeat several sentences in my last reply. Why would people write Windows application with rather MFC/ATL/.NET Framework than direct Windows API? Why is gtkmm framework created for GTK+? Would you write a X11 application with original X11 API, without QT or other X11 toolkit? I believe the answer is that all programmers are human begins, not machines. Human programmer would reduce brainwork, even if an API package/wrapper slightly reduces running efficiency. > > There's reasons that people here are somewhat skeptical about using > C++ in the kernel. > > Warner > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" ------------------------------------------------------------------------ From Beijing, China