by swaranga · 4mo ago · 0 comments
Why does the class author have to declare it as a value type? I know this has been rehashed before many times by Brian but I keep forgetting the reasoning.
If you were to call a function with a site declared value type, the function you call would have to have syntax as well to indicate "this is a value type I'm receiving and not a regular type" so that it doesn't do an illegal operation with the value type.
Java always had a focus on enabling library authors over empowering call-site users. And I think approach has proven its dividend.