Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove sealed from trait DefaultArrayValue #55

Open
amato-gianluca opened this issue May 25, 2012 · 2 comments
Open

remove sealed from trait DefaultArrayValue #55

amato-gianluca opened this issue May 25, 2012 · 2 comments

Comments

@amato-gianluca
Copy link

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?

@dlwh
Copy link
Collaborator

dlwh commented May 25, 2012

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
[email protected]
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:
#55

@amato-gianluca
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants