| Lars Uffmann 2008-01-23, 4:29 am |
| Giorgos Keramidas wrote:
> Reading my post again, it is more obvious that it would easily be
> mistaken to be a "holier than thou" thing. It was not intended to be
> one.
Apology accepted.
> My main objection stemmed from the countless times I've seen
> people (mostly in teams I've been a member of) reimplement something in
> C++ because they don't like existing C code.
Let me assure you it was not that, or I wouldn't have gone out of my way
to use the winsock (for compatibility with sockets) library, as well as
xerces-c and various others.
It's just that I needed to get back into programming C++, that I had a
working class already (and as you can see it's really not much code) and
that it's probably being discarded before I end up with a final version
of my tool (gathering a file transfer from out-of-the-order UDP datagrams).
> The comments about size_t and the runtime checks are the typical way
> *I* work most of the time.
Accepted, and I did take the point about size_t - though I have yet to
read up on it.
> Adding checks after the fact is something I can't always do in a
> successful manner, or in a non-intrusive to the API manner.
If I added checks for everything on every change of my code, in 5 out of
6 situations I'd end up checking conditions for code that I'll never use
in the end ;)
Best Regards,
Lars
|