[openbeos] Re: static libs for drivers

  • From: "Bruno van Dooren" <bruno_van_dooren@xxxxxxxxxxx>
  • To: <openbeos@xxxxxxxxxxxxx>
  • Date: Sat, 17 May 2003 17:42:24 +0200

> Can I use BObjectList, at least? I do not like STL templates. The whole
code
> looks ugly...

template code can be very ugly, but that is not the point. by using
templates, you
can do a lot of type checking at compile time instead of at runtime. this
makes code
more performant.

another advantage is that due to the nature of templates (basically
templates are just
compile time cut,copy and paste scripts) template code can be very fast
because the compiler
can optimize whole pieces or even layers of code away. this depends on the
actual code itself
of course.

but the downside is that it is also hard to debug.

do not let the fact that it is ugly discourage you  however. it is one of
the best features of C++.

kind regards
    Bruno.

Other related posts: