[m-rev.] for review: Add java support for the function foreign__to_type_string/2

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Mar 13 14:07:39 AEDT 2002


On 12-Mar-2002, Andre Yang <ayang at rationalizer.com> wrote:
> I took a look at the mlds_to_java__output_type, there seems to be also no full qualified names.

Look again.  E.g. it contains

 | 	output_type(mlds__generic_type) -->
 | 		io__write_string("java.lang.Object").	

> for other types I think it will make sense to add the boolean type, but 
> 1.should not for all foreign languages have  the same supported types by the passed parameters?.

No, not necessarily.  For example, the Haskell interface would ideally
map Mercury higher-order types to Haskell higher-order types.
But there's no simple way to map Mercury higher-order types to C.
So higher-order types should only be supported for the Haskell
interface, not for the C interface.

Also, there are backwards compatibility issues that affect the C
interface which don't affect interfaces with new languages.
The current C interface is not especially well designed, but we don't
want to change it now, since that would break all the existing code that
uses the C interface...

> 2. why is boolean not passed by the standard?

I think you mean "why is boolean passed as MR_Word in the C interface"?
Rather than, say, as "int"?

No particular reason.  But for C, passing booleans as MR_Word works just
as well as passing them as "int", or very nearly so.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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