Shock horror

Vlad Dumitrescu <>
Thu May 2 11:03:39 CEST 2002


>From: Richard Carlsson <>

>Then the gen_... modules, and any others using callbacks, would not be
>possible if this was strictly enforced.

They would be allowed to have a "uses(all)" declaration.

>Furthermore, that kind of
>declaration has an inherent problem: they tend to be always outdated.

True, but then we have the same kind of problem with the documentation. The 
compiler should do some work to ensure things are ok, the same thing as for 
-export().

>The information is already there: you don't need a -uses declaration
>just to duplicate it, with all the trouble that brings.

Mmm, yes and no. Usually, yes, the information is there. But then it isn't 
dynamic, is it? The dynamism comes from apply(Mod, Fun) - which xref can't 
analyze either.

I don't say this is the best solution, but I feel a simpler way than today's 
xref to obtain a broader view of the system would be useful. The 
declarations would cache xref's analysis - maybe xref could even update 
those when run!

>I think what we need is a reasonable layering of the libraries, not a
>fine-grained "is this module strictly necessary?" approach.

Looks like a great idea! Maybe your new module system might help this?

/Vlad

_________________________________________________________________
Skicka och ta emot Hotmail-meddelanden på din mobilenhet: 
http://mobile.msn.com




More information about the erlang-questions mailing list