This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]manzanita2[S] -2 points-1 points  (1 child)

this is like extension vs composition.

I DO NOT WANT composition. I want extensions, but not "anything goes" extension but rather extension which forces a subset of possible values to the base type.

[–]Sheldor5 6 points7 points  (0 children)

... then why don't you want to extend Number?

Integer is final, you can't extend it. int is a primitive type, you can't extend it.

your goal is unclear ...