[m-rev.] diff: Delete unused imports.

Zoltan Somogyi zoltan.somogyi at runbox.com
Wed Mar 30 15:07:57 AEDT 2022



On Wed, 30 Mar 2022 14:53:26 +1100, Peter Wang <novalazy at gmail.com> wrote:
> > Actually, the reason why the import of vartypes was flagged as unused
> > with --intermod-opt was a known limitation that we discussed in october:
> 
> If flagging vartypes as unused is due to a limitation, then would the
> opposite behaviour, i.e. flagging vartypes as USED in call_gen.m,
> be correct? Anyway, we both agree the answer to that is "no".

I don't agree. I have been saying that mmc's correct behavior for the version
of call_gen.m that includes an implementation section import of vartypes.m,
is NOT to generate an unused import warning for that import.

In any case, "flagging", to me, means reporting that something is wrong,
so the idea of "flagging an import as used" does not make sense.
 
> > > The reference manual doesn't
> > > explain what it considers a "use".
> > 
> > Module A uses module B if it needs information from module B's interface
> > to compile properly. While could and probably should give examples of
> > what counts as as use, I think we should avoid any statement of the form
> > "the above uses are the only possible uses", since such statements
> > could be invalidated by future changes to the language.
> 
> Right. Still, we can always make changes to the language
> as long as the reference manual is updated.

Of course.

Zoltan.





More information about the reviews mailing list