[m-dev.] foreign_import_module

Zoltan Somogyi zoltan.somogyi at runbox.com
Wed Jun 19 22:23:16 AEST 2019


Attached is a proposed diff of the documentation of foreign_import_module,
for review by anyone. I would particularly like to know if anyone knows the answer
to the question in the XXX it adds.

The reason I am posting this to mdev and not mrev is because I recently realized
that some of the difficulty I had working on foreign_import_module items (FIMs for short)
was caused by their misleading name. It *sounds* like it is a foreign language
version of the :- import_module declaration, but it is quite significantly different.
A FIM item says nothing about what .h file (or non-C equivalent) *this* module needs
during its compilation; it talks about what .h files *other* modules importing this one need
when *they* are compiled. Since we could call these other modules "client" modules,
I propose that we rename foreign_import_module to something like
foreign_import_for_client_modules. We would of course continue to accept FIM
syntax as well, for a long while.

What do people think? Do people agree that a less misleading name would help,
and does anyone have a better and/or shorter name than foreign_import_for_client_modules?

In the longer term, I am also planning to delete foreign_import_module items from
item blocks altogether, replacing them with a set of "module_name, foreign_language" pairs
at the top level of module parse trees, in part to avoid having to worry about duplicate FIM items.
Any objections?

Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.fim
Type: application/octet-stream
Size: 2940 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/developers/attachments/20190619/aaefcc56/attachment.obj>


More information about the developers mailing list