[bind10-dev] Socket creator and low-level code
Evan Hunt
each at isc.org
Wed Oct 20 21:17:59 UTC 2010
> Hopefully we can reach a group consensus on this list.
I like both versions okay, I don't have a very strong opinion on
the best way to do this.
I will suggest this, though: If something is written in what might as
well be C--using traditional pointers and foregoing the use of classes and
templates--then maybe we should be explicit about that, give it a ".c" file
extension and build it with the C compiler. Conversely, if it's going to
have a ".cc" extension and be built with g++, then we might as well use the
tools that C++ provides, including std::vector.
Given a choice between the two specific versions of read_data() in your
mail, I'd either use Michal's but change the static_cast<> to a C-style
cast and compile it explicitly as C, or else use yours.
(Incidental note: whichever version we go with, a function called
read_data() violates our style guidelines and should be, much as
I regret saying so, readData(). :) )
eh
More information about the bind10-dev
mailing list