On 1/5/12 1:45 PM, "Tink" <f...@tink.ws> wrote:


> 
> Couldn't we inject at compile time.As the compiler does with other
> metadata it could find injection points, and using Singletons hidden
> behind the scenes to give the correct values to the correct properties
> in the generated code? This would remove the current bottlenecks we
> have with DI.
> 
> Tink
> 
You can inject at compile time unless you can only determine what to inject
at runtime.  Like locales, automated testing engines, themes.

There are use cases for both.  A good DI implementation will support both.
I have a further goal that compile-time DI would be "legal ActionScript" in
that you could output the AS that is going to run. (Sort of like the
-keep-generated-actionscript option today).  That would make it a whole lot
easier to debug.

-- 
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui

Reply via email to