(I swear that this will be the last post before real work starts)

As a side note, here is some interesting topic about ZeroMQ:

Being some closely related languages, easily interoperable, C and C++ are almost viewed as the same thing, as if C++ was “C with classes” or C was “A subset of C++”. So there wouldn’t be much of a dispute to use one or the other for a project, right ?

Well, not quite…

Some years ago, a former (looks like) ZeroMQ developer, Martin Sustrik, expressed his regret in choosing C++ over C for writing the project’s core library (libzmq), in two publications that you can see here and here. Even if he stated that it seemed a bad choice only for this specific case, it obviously raised some discussion (after all, we are on the Internet), as there is an immensity of programmers really found of C++ and the object-oriented paradigm (and they have their reasons for it).

(Not that you can’t do OOP in C, or procedural programming in C++, but that’s another history…)

To me, those posts aren’t a problem themselves. They even contribute to the community general knowledge, as they look thoughtful and full of arguments, and address a particular case: a low-level library for lightweight networking.

But, looking at the big picture, those opinions add fuel to an older long-term debate, marked by much more heated manifestations (ask Torvalds), which shows that some design decisions are not that easy and trivial.

C guys could argue that C++ carries the burden of a bloated runtime and abstraction overhead, and that their language of choice allows for better code optimization and predicability. C++ supporters, on the other side, could say that one is not required to use STL or Boost containers just by using C++ (C guy: “By why use it, then ?”), and that modern compilers can optimize more readable and maintainable C++ object-oriented code to the same binary performance of a C program (besides, Premature optimization is the root of all Evil).

And so on…

As a C guy myself, I like to see my preferred language still having its place among the shining new things, but I’m aware that it doesn’t suit each and every need out there.

In the end, I guess it is reasonable to say that, in Computer Programming, “everything is a matter of knowing the right tool for the job” (I suppose that’s a quote from someone).

The fact is, the ZeroMQ developer reconsideration leaded to the creation of a new networking library, nanomsg, completely written in C, more modern in some aspects, and carrying all the accumulated knowledge from libzmq work.

Its development stalled on the past months, and the project struggled due to the lack of leadership. But looks like now they are right back on track, recently releasing an almost complete version 0.9. So, I really hope they succeed.

Even ZeroMQ now has nice and well-maintained C bindings, but the core library remains written in a subset of C++, which, as said in the previous post, I’ll be using in my GSoC work.

“As few layers as possible. But no less than that”, I would say.

Anyway, this is just a subject I would like to bring to the table … What do you think?