News for hackers. Stuff that matters.
Re:Data Classes for Java by HumanDrivenDev on Wednesday November 01, 2017 @10:55PM (#15607475)
> I can't speak to Java, but in C#, the original goal was to reduce coupling.

If you want to reduce coupling, why not write a real method? Get/Set couples you to your class fields. If you change your class fields, your getters and setters all suddenly become useless.

Maybe I just hate the middle ground (:

Re:Data Classes for Java by bunderbunder on Thursday November 02, 2017 @01:39PM (#15612465)
No, they don't.

I have, plenty of times in the past, changed a class's implementation details in a way that results in fields being removed, without having to create a breaking change in the associated property getters and setters. All it took was changing their implementation to work with whatever the new thing was.