I would like to change the #defines for ST_, TR_, NLBA_, etc. into
enums.  This would make debugging easier.  However, I have two concerns.

Firstly, it changes the size of the structures (= more memory to compile
a score) unless I use the GCC __attribute__(packed) extension.  Are we
targetting anything other than GCC?  If so, does anyone know of a more
portable way of making enums smaller, or does that mean we switch to C++
to give enums a specific underlying type?

Secondly, using enums in a structure is considered bad for an ABI
because the size of an enum is implementation dependent as just
described.  This is only a problem if gregorio will become a library
that other applications link to.

Let me know if we as a group are against this.

My next topic is macros.  I find macros difficult to read and there can
be some surprising side-effects to their use as opposed to functions.
Is there a reason why macros were chosen for gregorio instead of
functions for certain things?  Speed?  Should we consider using the GCC
__inline__ extension or switching to C++ for function inlining?

Thanks,
Henry

_______________________________________________
Gregorio-devel mailing list
[email protected]
https://mail.gna.org/listinfo/gregorio-devel

Répondre à