[m-dev.] shims

Zoltan Somogyi zoltan.somogyi at runbox.com
Tue Sep 16 22:53:40 AEST 2014



On Tue, 16 Sep 2014 19:01:46 +1000, Mark Brown <mark at mercurylang.org> wrote:
> There's a few points that I hope would mitigate the difficulty of
> implementation:
> 
> (1) These constructs are useless without clauses, so they can only be
> used in the implementation section.

You still have to decide what to do if you find them elsewhere.

> (2) The contents of the branches will be in the implementation section
> of the sub-module; its interface will only contain generated code,
> which can be handled specially.

More special handling is exactly what I am afraid of, since it means
more technical debt.

> (3) If necessary, the items allowed in branches can be restricted,
> without harming the usefulness of the feature too much. Even if
> initially just clauses were allowed this would still solve the
> original problem.

Again, you still have to decide what to do if the imposed restrictions
are violated. Avoiding an avalanche of error messages caused
by improper recovery from a previous error is highly desirable,
but in this case it also looks hard to implement.

> Between them, they should mean that, amongst other things, far fewer
> import_statuses need to be understood.

Unfortunately, just deciding what import_statuses need to be handled
requires ALL of them to be understood when writing the code :-(

> I don't think you're joking. I think you are describing exactly what
> happened when sub-modules were added to the module system. :-(

Yes, exactly.

Zoltan.



More information about the developers mailing list