[nanomsg] inline functions vs. macros

  • From: Chip Salzenberg <rev.chip@xxxxxxxxx>
  • To: nanomsg@xxxxxxxxxxxxx
  • Date: Tue, 20 Aug 2013 10:59:57 -0700

Congrats on reaching alpha!  I'm pleased as punch to see this and will be
using it ... there's a marvelous little C++ fibers+networking kernel that
it will fit into Very Nicely.  https://github.com/toffaletti/libten

A question: As a core developer of Perl I'm excruciatingly aware of the
need to keep code portable to the worst C compiler, so C99 is Right Out
(grr Microsoft).  By the same token, I'm also aware of the limitations of
macros for maintainable coding.  Fortunately, as it happens, all C
compilers anyone would reasonably target today support inline functions --
most of them because they support C99, and also MSVC because MS decided
inline functions were cool.

Is it a decision or just accident that nanomsg uses macros rather than
inline functions for its function-like macros?  Would a conversion to
inline functions be welcome, unwelcome, or wait-and-see?

Other related posts: