Open amato-gianluca opened 12 years ago
Happy to accept a patch on this one. DanR was historically opposed, but I don't really care. Add a note that the value must be logically "zero" or you'll run into trouble with what the operators expect, if you would.
-- David
On Fri, May 25, 2012 at 1:26 PM, Gianluca Amato reply@reply.github.com wrote:
Hi, I need to extend scalala to work with class BigDecimal. I implemented an implicit object for Scalar[BigDecimal] and a lot of implicit objects for the different operators, but since the trait DefaultArrayValue is sealed, I cannot define an object of class DefaultArrayValue without changing the scalala source code. Why is this trait sealed? Wouldn't be better to make it non-sealed?
Reply to this email directly or view it on GitHub: https://github.com/scalala/Scalala/issues/55
The comment on the trait DefaultArrayValue says that "this value must be null for all references types in order for SparseArray to work as expected". So, I am not sure anymore it is safe to override the default null value for BigDecimal. I'll do some experiments.
Hi, I need to extend scalala to work with class BigDecimal. I implemented an implicit object for Scalar[BigDecimal] and a lot of implicit objects for the different operators, but since the trait DefaultArrayValue is sealed, I cannot define an object of class DefaultArrayValue without changing the scalala source code. Why is this trait sealed? Wouldn't be better to make it non-sealed?