[m-rev.] document Java foreign language interface
Ralph Becket
rafe at cs.mu.OZ.AU
Thu Dec 4 13:58:28 AEDT 2003
Fergus Henderson, Thursday, 4 December 2003:
> On 04-Dec-2003, Ralph Becket <rafe at cs.mu.OZ.AU> wrote:
>
> More seriously, I just realized that my original documentation was wrong:
> the success indicator goes at the start of the sequence, not at the end.
Putting it at the end did seem like an odd convention :-)
> How about this:
>
> The result of the Java function will be a sequence comprised of
> the outputs of the Mercury procedure. If the Mercury procedure's
> determinism indicates that it can fail, then its first output will
> be a @samp{boolean} success indicator, with a @samp{true} value
> denoting success and a @samp{false} value denoting failure. The
> remaining outputs will be the subsequence of the Mercury procedure's
> arguments and function result (if any) that have output modes.
Sounds about right to me. I don't think I'd have trouble understanding
that coming to it cold.
> > Hmmm... what's the mapping from data constructors to Java classes? Or
> > is this private, in the sense that the programmer has to export field
> > accessor predicates to Java if they want to manipulate Mercury values
> > from within Java?
>
> I'm happy to keep it private for now, and document it only in the source
> code (mlds.m, ml_type_gen.m and/or mlds_to_java.m) not in the language
> reference manual. Currently the actual mapping is a bit too likely to
> change to document for users, IMHO.
>
> Note that "pragma export" is not yet part of the language-independent
> foreign language interface chapter, and is not yet supported for Java.
Righto.
-- Ralph
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list