Date: Sun, 28 Oct 2007 00:03:00 -0600 (MDT) From: "M. Warner Losh" <imp@bsdimp.com> To: bms@incunabulum.net Cc: freebsd-arch@freebsd.org Subject: Re: C++ in the kernel Message-ID: <20071028.000300.-861062412.imp@bsdimp.com> In-Reply-To: <4722BDBE.5030408@incunabulum.net> References: <4722BDBE.5030408@incunabulum.net>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <4722BDBE.5030408@incunabulum.net> Bruce M Simpson <bms@incunabulum.net> writes: : It seems a team in Iceland succeeded in making Linux C++ enabled: Most people on this list haven't had experience with eC++. In this environment, a number of the features of the language are omitted to be better suited to the embedded environment. If it were up to me, I wouldn't bother with supporting exception. They are one of the areas that are abused that have dire consequences when abused (uncaught exceptions are evil, for example). Rtti was also omitted from eC++ as well. These things help debloat the language and can be used to good effect. The kernel isn't a general purpose computing environment. However, C++ features would help in a great many cases. There's already some C++ elements in kobj, which help us in our implementation of newbus. However, as time passes, more and more things are written in other languages, including C++. Many of these other languages are totally unsuitable for the kernel. Python, Ruby and Perl, while great scripting languages, will never be in the kernel. The old vmkernel.el joke will never happen either (although there's been rumors of an in-kernel compiled-lisp interprater floating around). C++ support, driven by people's experience with OS X, will continue to be a highly desired feature. At this stage, I think if someone came forward with patches, that could be optionally installed, there would be support for including them. Maybe installed as a port. There's been little to no support for integrating C++ into the kernel for general use by the base system, so new C++ drivers or subsystems would meet extreme resistance. However, having C++ support would allow the extreme FreeBSD users to suffer or benefit from C++ in their kernels without having to reinvent the base wheel. I think the arguments are strong enough for this, but not so strong as to accept it into the base at this time without some compelling proof that it can be done, in FreeBSD, without extreme pain. Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071028.000300.-861062412.imp>