What is Nostr?
Skoop (Stefan Koopmanschap) /
npub1y8s…se9v
2024-04-10 14:13:11
in reply to nevent1q…fu52

Skoop (Stefan Koopmanschap) on Nostr: I don't see another option to be honest. If you need to reference it and you can't do ...

I don't see another option to be honest. If you need to reference it and you can't do it dynamically, then there is no other option and I'd prefer the ::class over strings.

The only thing I could think of is to invert the coupling. So define the interface in your "local" code and make the implementing class that should not be depending upon implement the interface (talking about different domains or bounded contexts). If possible. And if it makes sense.
Author Public Key
npub1y8ssl4a2645mzxgedhdu8xkuz5mlzvp9dt9twwqswrjguqg57grqd6se9v