Tugger the SLUGger!SLUG Mailing List Archives

Re: [coders] Well designed C++ API?


Andre Pang wrote:

> Using smart pointers in C++ also makes memory management _much_  
> easier,

I prefer smart design to the C++ template foo around smart pointers.
For instance, if a class can be designed to behave in an RAII way,
much pointer hackery can be localised and thereby made safe.

> and boost::shared_ptr is a very high quality implementation  
> of a smart pointer that's available on a lot of platforms.

I realise that all this C++ template foo is very tricky, but
it *really* doesn't aid clarity. Code is written once and
read thousands of times. Template code often looks like line
noise to me.

Erik
-- 
+-----------------------------------------------------------+
  Erik de Castro Lopo
+-----------------------------------------------------------+
The difference between genius and stupidity is that
  genius has its limits.