lambdista/money

Implicit currency?

Opened this issue · 3 comments

What do you think about having an implicit currency?

That way you could do:

val x: Money = 1
val z = Money(1.00)

Thank you for the suggestion but I'm not a fan of implicit conversions. I think they are confusing unless they are obvious. In this case a European will think the implicit currency is EUR while an American will think it's USD.

No, I get that... I mean, make it an option to provide an implicit -- so I would need to declare, for instance, implicit val myLocalCurrency = EUR or something like that?

I don't know, I'd rather require explicit currency. Anyway I'll consider this, thank you.