[m-users.] Mercury macro trouble
Volker Wysk
post at volker-wysk.de
Mon Jun 3 20:03:37 AEST 2024
Am Sonntag, dem 26.05.2024 um 15:01 +1000 schrieb Julien Fischer:
> My suggestion would be that the list module in the standard library
> provide function
> versions of these operations (as indeed it does for the C# and Java backends).
> Users should be directed to those, instead of the runtime macros ...
So will this be implemented?
> ... or users should just foreign export pragmas the operations they
> need to manipulate
> lists in foreign code. As indeed you would need to do if you wanted
> to manipulate just
> about any other data structure in the Mercury standard library from
> foreign code. This
> approach also automatically handles whether arguments need to be boxed etc.
But it would be handy if this was predefined (same as in the C# and Java
backends).
And, even if you don't want to provide function versions, the documentation
should be extended by a sentence or two. Saying that the macro versions are
problematic and that users should use foreign exports instead - or that they
should use inline functions, which wrap the macros, like it was discussed.
Cheers,
Volker
More information about the users
mailing list