[openbeos] Re: static libs for drivers
- From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
- To: openbeos@xxxxxxxxxxxxx
- Date: Mon, 19 May 2003 23:21:52 +0200 CEST
"Bruno van Dooren" <bruno_van_dooren@xxxxxxxxxxx> wrote:
> > We need a library that has everything for C++ kernel programming in
> > it.
> personally, i think that kernel programming should be done in C:
> -C compilers are a lot simpler, and thus will contain fewer bugs.
Although I had some problems with optimizations and BFS, I doubt that
this is a general problem (when using a current compiler).
> -C++ exceptions in a kernel are probably not nice.
I think so, too, that's why we don't allow do use them. We also don't
make use of RTTI; we don't need a C++ runtime at all.
> -C++ contains overhead compared to C. while it is easier to think of
> things as obkects, this also adds overhead, especially if you are
> going to
> use virtual functions.
That's simply not true - the only overhead that could be caused by C++
is a slightly larger memory usage because one tend to encapsulate more
data. But that's really not much if measurable at all.
Just have a look at how I used C++ in BFS - it makes the code a lot
better, easier to read and removes many critical pitfalls (like
cleaning up in case of an error - I tend to create those objects on the
stack, so C++ will always clean up automatically when I make a simple
"return").
Also, C++ has better type safety.
Adios...
Axel.
- Follow-Ups:
- [openbeos] Re: static libs for drivers
- From: Bruno van Dooren
- References:
- [openbeos] Re: static libs for drivers
- From: Bruno van Dooren
Other related posts:
- » [openbeos] static libs for drivers
- » [openbeos] Re: static libs for drivers
- » [openbeos] Re: static libs for drivers
- » [openbeos] Re: static libs for drivers
- » [openbeos] Re: static libs for drivers
- » [openbeos] Re: static libs for drivers
- » [openbeos] Re: static libs for drivers
- » [openbeos] Re: static libs for drivers
- » [openbeos] Re: static libs for drivers
- » [openbeos] Re: static libs for drivers
- » [openbeos] Re: static libs for drivers
- » [openbeos] Re: static libs for drivers
- » [openbeos] Re: static libs for drivers
- » [openbeos] Re: static libs for drivers
- » [openbeos] Re: static libs for drivers
- » [openbeos] Re: static libs for drivers
- » [openbeos] Re: static libs for drivers
- » [openbeos] Re: static libs for drivers
- » [openbeos] Re: static libs for drivers
- » [openbeos] Re: static libs for drivers
- » [openbeos] Re: static libs for drivers
- » [openbeos] Re: static libs for drivers
- » [openbeos] Re: static libs for drivers
- » [openbeos] Re: static libs for drivers
- » [openbeos] Re: static libs for drivers
- » [openbeos] Re: static libs for drivers
- » [openbeos] Re: static libs for drivers
- » [openbeos] Re: static libs for drivers
- » [openbeos] Re: static libs for drivers
- » [openbeos] Re: static libs for drivers
- » [openbeos] Re: static libs for drivers
- » [openbeos] Re: static libs for drivers
- [openbeos] Re: static libs for drivers
- From: Bruno van Dooren
- [openbeos] Re: static libs for drivers
- From: Bruno van Dooren