What would we gain from being a bit more draconian about the base type?
We gain being standards-compliant. A C enum is an int, period.
i kinda agree.
but on the other hand:
it's pretty useful where i've seen it in the wild, in cl-glu: there are a bunch of #define's with increasing values, and a function that accepts those values, but in a double typed argument. with a relaxed defcenum, or equivalent, one can continue using the automatic keyword-symbol->value mapping.
maybe add another, more relaxed costruct? a cffi:defenum?
but on the other hand is the added complexity worth it? is a use-case like this frequent enough to warrant it?
this all more or less boils down to the following fundamental question: should CFFI try to mirror the C standard on the lisp side? or should it be more permissive where the cost of being permissive is low (e.g. in introducing latent bugs or other programmer surprises)?