Decimal syntax (original) (raw)

I think it's a wonderful idea. BigDecimal are very common, especially so in business logic code. As it stands now, handling the most basic calculations on decimals involves technical details that obfuscates the code.

I'd love it if this business logic could be expressed in a clearer way (and more succinct as a side effect).

Could you please explain the difference between limited operator overloading and decimal-specific support? What is "limited" in this context? having to declare the classes that are allowed to participate?

For what other types would it make sense to apply operator overloading (Date/Collection)? What about applicative types wrapping numeric values (like Money for BigDecimal or Age for int)?