I agree with most things (pretty excellent 0MQ thread post!) except
blanket compiling code as C++.  Unexpected things start to happen
outside of your control like namespace mangling.  This can hurt when
doing certain dynamic code loading.  That's just one example of a
"hidden" change coming in with a C++ compile versus pure C.

It would be nice to get to the bottom of this linking issue on RHEL
systems though.

On Tue, Feb 21, 2012 at 10:46 PM, john skaller
<[email protected]> wrote:
> You should always write C++ programs
> and use g++ anyhow, even if your code is meant to be C, since
> C++ provides much better type safety, even for C programs.

If you want to write C code, and want to be safer, it's probably
better to turn to static analysis tools like Splint
<http://www.splint.org/> or the more recent Clang static analyzer
<http://clang-analyzer.llvm.org/> rather than pretend it's C++ code
and use a C++ compiler just for stronger type safety (still not
great).

--
Wolf
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to