OpenBFS (was Re: C++ code in a kernel module?)
Pedro F. Giffuni
giffunip at yahoo.com
Mon Sep 8 21:05:06 PDT 2003
Hi;
Attached is a good reasons why someone my want to use C++ in the kernel.
cheers,
Pedro.
(FWIW, OpenBFS is under an MIT license)
_________________________
http://open-beos.sourceforge.net/tms/team.php?id=2
OpenBFS, as all file systems under BeOS, is being developed as a kernel add-on.
Unlike all other file systems (and kernel add-ons in general), it is being
developed in C++. Contrary to popular belief, it is possible to use C++ in the
kernel provided you play by the book and follow some rules:
* No exceptions
* (Almost) no virtuals (well, the Query code in OpenBFS uses them)
* It's basically only the C++ syntax, and type checking
* Since one tend to encapsulate everything in classes, it has a slightly higher
memory overhead
This is acceptable as we get some benefits out of it:
* Nicer code
* Easier to maintain
______________________
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
More information about the freebsd-hackers
mailing list