[m-dev.] shims

Zoltan Somogyi zoltan.somogyi at runbox.com
Tue Sep 16 13:16:34 AEST 2014



On Tue, 16 Sep 2014 12:05:25 +1000, Peter Wang <novalazy at gmail.com> wrote:
> Hmm, it should be possible to qualify names within a branch,
> but if "branch sub-modules" are unnamed then it's a bit hard to do.

I suspect that "a bit hard to do" is WAY, WAY underestimating
the difficulty of implementing the proposals in this thread.

The compiler's current handling of the item list is much more
complicated than it seems. I tried to clean it up once, and failed.
I thought it should have been simple to replace the current
item list with a list of modules in which each module contains
a list of submodules and a list of items that were not :- module
or :- end_module. Even this was far from simple. Most of the
problems I bumped into were caused by parts of the compiler
seeming requiring the maintenance of invariants that were
undocumented, and did not live anywhere except in Fergus's head
(and which I am pretty sure don't live there anymore either).
Some of these involved the handling of import_statuses,
about whose complexities Paul should be able to report
in more detail, as the last person to look into that nest of vipers :-(

If someone wanted to implement any of these proposals
without first cleaning up the handling of item lists, there are
only two outcomes:

- They fail, probably after a lot of work. This is bad.

- They succeed, after even more work. This is even worse,
  as it means that whoever DOES clean up that code later,
  will have more code to clean up, and until then, subtle bugs
  have more places to hide.

You may think I am joking. I am not.

Zoltan.




More information about the developers mailing list