[Freeciv-Dev] Re: curiosity
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sunday 02 December 2001 12:42 pm, Justin Moore wrote:
> Until you get it into a debugger. Have you ever tried to follow the
> STL around in gdb? That *alone* should be a reason NOT to use the STL
> (not necessarily C++, just the STL).
that's not really a reasonable discouragement for using stl. granted, it may
be kind of hard to figure out, but once you get used to it, it's not to
tough. besides, with stl, the hardes thing to figure out is going to be const
casting of pointers and references from within containers.
> Agreed. When used properly and in a controlled environment, void* can
> be used effectively as an abstraction mechanism without a lot of the nasty
> C++ overhead.
sorry. void ptrs are a fallback mechanism when you can't think to make
anything else work. *good* code (c or c++) will be able to avoid using void
ptrs all together (except for raw memory operations like new, delete, memcpy
and malloc).
the primary reason you should never use void pointers is that they are
completely type-unsafe. like i said. good code doesn't use them.
andy
- [Freeciv-Dev] Re: curiosity, (continued)
- [Freeciv-Dev] Re: curiosity, Raimar Falke, 2001/12/01
- [Freeciv-Dev] Re: curiosity, Andrew Sutton, 2001/12/01
- [Freeciv-Dev] Re: curiosity, Petr Baudis, 2001/12/02
- [Freeciv-Dev] Re: curiosity, Raimar Falke, 2001/12/02
- [Freeciv-Dev] Re: curiosity, Andrew Sutton, 2001/12/02
- [Freeciv-Dev] Re: curiosity, Raimar Falke, 2001/12/02
- [Freeciv-Dev] Re: curiosity, Andrew Sutton, 2001/12/02
- [Freeciv-Dev] Re: curiosity, Justin Moore, 2001/12/02
- [Freeciv-Dev] Re: curiosity,
Andrew Sutton <=
- [Freeciv-Dev] Re: curiosity, Reinier Post, 2001/12/02
- [Freeciv-Dev] Re: curiosity, Andrew Sutton, 2001/12/02
[Freeciv-Dev] Re: curiosity, Reinier Post, 2001/12/02
[Freeciv-Dev] Re: curiosity, Raimar Falke, 2001/12/01
|
|