[m-dev.] for discussion: pragma foreign_import

Tyson Dowd trd at cs.mu.OZ.AU
Thu Dec 6 08:39:08 AEDT 2001


On 06-Dec-2001, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> On 05-Dec-2001, Peter Ross <peter.ross at miscrit.be> wrote:
> > > > :- func cos(float) = float.
> > > > :- pragma foreign_import(il, cos(in) = out,
> > > > ".method public static float64 Cos(float64)"
> > >
> > > Can I suggest using a different name.
> > >
> > > `foreign_import' is very similar to `foreign_import_module' but
> > > they have very different meanings. Maybe `foreign_call' or
> > > `foreign_proc_call' would be better (this is really just a shorthand
> > > for a `:- pragma foreign_proc' declaration containing only the call).
> 
> > I was actually planning to switch to using `:- pragma import' but while
> > developing the new change I was going to accept both syntaxes, just to
> > make it clear which was which.
> > 
> > However if we decide to keep both versions then I am more than happy to
> > make the change.
> 
> All of the other foreign language interface declarations are
> being renamed to `:- pragma foreign_...', so for consistency
> `:- pragma import' should be renamed as well.

Well, we are introducing new foreign language interface declarations
called `:- pragma foreign_...', not just renaming.

We don't have to rename `:- pragma import' as `:- pragma
foreign_import', this is a good time to rename it (and I favour renaming
it).  foreign_proc_import or foreign_proc_call would be better.

-- 
       Tyson Dowd           # 
                            #  Surreal humour isn't everyone's cup of fur.
     trd at cs.mu.oz.au        # 
http://www.cs.mu.oz.au/~trd #
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list