MoneyContext should be abstract class
Hi, I'm trying to tweak the MoneyContext but being a case class make it really hard. Could we create an abstraction ?
@pocman I am beginning to take a look at this. This should be easy enough to do. What you're trying to tweak? I'd like to keep your use cases in mind and perhaps base the tests on them.
As this would break binary compatibility, this will be slated for the 2.x series.
I'd like to second this. I want to write a MoneyContext that makes an external API call for the currency requested. Loading everything in advance eats away my maximum allowed API calls.
Hmm? That means you would be adding a latent operation to an otherwise synchronous method. We may need to implement Future based operations on MoneyContext to support that. Of course, that depends on your implementation, @ipsq. Have you gotten that far?
That wasn’t an issue for me personally because I only use this library for Ammonite. This does feel like a complicated issue that needs a lot of thought. If it would introduce a separate dependency, say cats-effect, I do recommend releasing a separate module.