Cool project idea: organise/remove imports

Quirin Schroll qs.il.paperinik at gmail.com
Tue Jul 16 12:01:37 UTC 2024


On Thursday, 11 July 2024 at 10:28:35 UTC, Atila Neves wrote:
> It'd be amazing if one could hit a key/key combination and have 
> all imports pared down to the absolute minimum (and made 
> local). If only I had the time...
>
> Imagine being lazy, typing "import std;" at module-scope, 
> writing some code and... boom. "Hand-written" local imports 
> everywhere. One can dream.

String mixins immediately make that a best-effort solution. Even 
if you run the mixins, their result might depend on your platform 
or whatnot and require other imports on other platforms that are 
unused on your platform.


More information about the Digitalmars-d mailing list