Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I have long considered that having to have the class definition explicit in the file is redundant, especially as the 2 have to have the same name anyway. Obviously if you need to `extend` or `implement` then an explicit declaration is needed. But otherwise, just defaulting to the file base name is more than sufficient.


Except for interfaces, record classes, type parameters, class-level annotations and javadoc. There's probably more I'm not thinking of right now.


Groovy does a good job with this type of thing.

Edit: but a bad job at a lot of other things.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: