2 ms·
I think a better description is "Java is becoming more like C#", which got these immutable-by-default record types many years ago.
by Analemma_ 3y ago
I think a better description is "Java is becoming more like C#", which got these immutable-by-default record types many years ago.
- vips7L 3y agoActually records in Java were released a full 6 months before C#'s version of records.
- recursive 3y agoC# 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.