What is Nostr?
P-Y /
npub19ww…g5sa
2024-01-17 06:09:49

P-Y on Nostr: Did you know you can build a Dependency Injection Framework that fits in a toot? ``` ...

Did you know you can build a Dependency Injection Framework that fits in a toot?

```
class Linker {
val factories = mutableMapOf<Class<out Any?>, Linker.() -> Any?>()
}
```

That's it! Yes, it's just a map. A little map of object class keys to object factories.

Can you believe it? Let's explore this in a thread, and build a CoffeeMaker!

#AndroidDev
Author Public Key
npub19wwxc29uufy6rmegf9aza3hkcqdu00s8yyfyhr88mglptysgp3tsz7g5sa