[m-dev.] foreign enum module qualification

Zoltan Somogyi zoltan.somogyi at runbox.com
Fri Oct 4 13:46:50 AEST 2019


Foreign enum pragmas specify a mapping from the names
of an enum type's constants to their foreign names. At the moment,
we allow programmers to module qualify the names of the constants,
but there is not much point in that, since the only valid module name
that the qualification may yield is the name of the current module.

I would guess that the only reason for allow module qualification
on the constant names is to reuse code that handles foreign_export_enums,
in which module qualification *does* make sense.

Would anyone object if we required the constant names in foreign_enum
pragmas to be unqualified? It would remove a potential source
of user errors. And even though in *theory* this is a breaking
change, in practice, it isn't really, since people tend not to write
such obviously redundant qualifications.

Zoltan.


More information about the developers mailing list