On Fri, Dec 20, 2013 at 10:51:13PM +0100, monarch_dodra wrote:
> On Friday, 20 December 2013 at 21:36:15 UTC, Andrei Alexandrescu
> wrote:
> >On 12/20/13 12:43 PM, Martin Nowak wrote:
> >>Couldn't static imports be made lazy without breaking any code?
> >
> >One simple idea is to make all imports lazy - no change in
> >semantics.
> >
> >Andrei
> 
> If the import is lazy, how do you know which import to load when you
> see an unknown symbol? lazy static import works, because they have
> to be fully qualified.

Yeah, much as I like the idea of all imports being lazy by default, I
see a lot of potential problems in the implementation. If you have 10
lazy imports and you reference an unknown symbol, will the compiler now
go and import all 10 modules just so it can search them for the unknown
symbol?  Sounds like recipe for disaster.


T

-- 
It only takes one twig to burn down a forest.

Reply via email to