Y
Hacker News
new
|
ask
|
show
|
jobs
by
rimliu
3276 days ago
Well, having 'class' method on struct or enum would look kind of weird, these are value objects, not classes.
1 comments
saghm
3276 days ago
So why not just static methods, then?
link
salutis
3274 days ago
Static methods are final, class methods are not.
link
saghm
3274 days ago
I was responding specifically to the argument that you can't have only class methods because not everything is a class, in which case you could just call them something else other than "class method".
link