[m-rev.] trivial diff: delete java mercury directories

Julien Fischer juliensf at csse.unimelb.edu.au
Tue Jun 16 16:01:33 AEST 2009


On Tue, 16 Jun 2009, Paul Bone wrote:

> On Tue, Jun 16, 2009 at 03:09:25PM +1000, Peter Wang wrote:
>> 2009/6/16 Zoltan Somogyi <zs at csse.unimelb.edu.au>:
>>>
>>>> I suppose that means I should go ahead and delete Mmake support for Java, which
>>>> is the only way a "mercury" directory can appear at the same level as a
>>>> "Mercury" directory.
>>>
>>> I think that would be throwing the baby out with the bathwater.
>>
>> I also forgot about implict make rules.  Even if it's not officially
>> supported, Mmake still gets quite far into the process and you end up with
>> the `mercury' directory.
>>
>> Ok, let's package everything in au.edu.unimelb.mercury.
>>
>> I think we can use a different mapping from Mercury module names to Java
>> package/class names.  A simpler scheme would be to put everything in
>> package `au.edu.unimelb.mercury', then
>>
>>     module `foo' goes to `foo.java'
>>     module `foo.bar' goes to `foo__bar.java'
>>     etc.
>>
>> Since all Mercury code is in the same package, we don't need to fully
>> qualify everything with au.edu.unimelb.mercury.  I don't know why I didn't
>> think of it before.
>>
>
> I don't think third party code should begin with this prefix.  It is
> written in mercury not by the mercury group.

I agree - I have always found the Java naming convention above silly.
(Which is why the Java backend never used it in the first place.)
To me, placing generated code in a mercury package is the right
solution.

However since this is interacting badly with mmake, there are two
obvious resolutions:

(1) require the use of mmc --make with the java grade and place the
     "mercury" directory under the "Mercury" directory.

(2) use a different package name, "mer" for example.

Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list