Dependency Context

From Adam Colton
Jump to navigation Jump to search

From Jonathan Blow's Jai we get the idea of context and from many (mostly C#) we get dependency injection. I'm not sure I really like either but together I think there's a good idea.

Unlike DI, the arguments aren't fulfilled, instead there is a syntax for requesting a dependency.

Package Types

From Jai, the context can also include the compiler chain context. Which means we can do things like intercept 'unsafe' in applications.

So the standard library can include package types that couple a useful base configuration along with build rules. Then the concepts of application, library, module and so on don't need to be baked into the language, they are part of the standard library.