Hacker News new | ask | show | jobs
by Analemma_ 843 days ago
I think a better description is "Java is becoming more like C#", which got these immutable-by-default record types many years ago.
2 comments

Actually records in Java were released a full 6 months before C#'s version of records.
C# still, to my regret, doesn't have anything like sealed interfaces. The closest thing I've found is an abstract class with an `internal` constructor. That prevents sub-classing from outside the compilation unit, but it still doesn't exactly capture the intent.