[m-users.] Mercury macro trouble

Volker Wysk post at volker-wysk.de
Tue Jun 4 18:33:41 AEST 2024


Am Dienstag, dem 04.06.2024 um 10:50 +1000 schrieb Mark Brown:
> On Mon, Jun 3, 2024 at 8:03 PM Volker Wysk <post at volker-wysk.de> wrote:
> > 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.
> 
> Adding qualifiers about all of C's relevant quirks would not improve
> our documentation in my view. The issue with macros is something I was
> taught early on when learning C, and I think it inherently applies to
> macros for any language with imperative features. It should be enough
> just to say that they are macros.

Why can't you (the Mercury team) just replace those five macros with inline
function versions with the same name? This would resolve all those quirks
and issues...

Cheers,
Volker


More information about the users mailing list