[m-rev.] for review: reversing operator priorities
Julien Fischer
jfischer at opturion.com
Sat Nov 12 01:32:27 AEDT 2022
On Sat, 12 Nov 2022, Zoltan Somogyi wrote:
> On Fri, 11 Nov 2022 13:18:53 +1100 (AEDT), Julien Fischer <jfischer at opturion.com> wrote:
>>> + % XXX operating system
>>
>> operating system?
>
> That was supposed to be "XXX OPS", but it seems that in that
> vim session, I forgot to disable my vim macro that automatically
> expands OPS to operating system.
>
> The point of that XXX is that the name lookup_op is misleading.
> First, lookup_up is a semidet predicate, while everywhere else
> in the library lookup names det operations. Second, it does not
> return anything; it merely tests whether the given string is an operator
> in the given table. I would suggest renaming to something
> like is_operator or is_op.
I would go with is_op.
>>> - % The Mercury operator table used to be the only one allowed.
>>> - % The old names are no longer appropriate.
>>> + % We export this type synonym to io.m (for get_op_table/set_op_table)
>>
>> The whole setup with io.get/set_op_table seems clunky.
>
> Agreed.
>
>> The only user of
>> io.get_op_table is term_io and it could just call ops.init_mercury_op_table
>> directly. It's not clear to me why io.get/set_op_table need to exist.
>
> Nor to me. Should we mark them as obsolete? I think so.
Yes, I think they should be marked as obsolete.
Julien.
More information about the reviews
mailing list