[M3devel] imports anywhere?

Tony Hosking hosking at cs.purdue.edu
Mon Feb 11 17:40:11 CET 2008


I hate imports that are scattered throughout since it hides  
dependencies deep in the guts of the code.  Much better to have them  
explicit at the top!

On Feb 11, 2008, at 7:48 AM, Jay wrote:

> Here is another SMALL gripe with the language.
> The need to put IMPORTS at the top (or is it just common style?),  
> leads to something I have seen several times.
> You comment out some code, thereby deleting the only/last use of  
> some import, that nets you warnings about unused imports. Granted,  
> they are "only" warnings, but I try to have none. Also granted, you  
> can either comment out or just go ahead and remove the imports, easy.
>
> It might be nice if the IMPORTS could be adjacent to the code using  
> the IMPORTS, so that they can be comment out or removed together.
>
> This "problem" is not unique to Modula-3, by far.
> In fact, Modula-3 is probably more able to warn about this low cost  
> waste due to its much better module system, compared to say, C and C 
> ++ #includes..




More information about the M3devel mailing list