News for hackers. Stuff that matters.
Re:Data Classes for Java by HumanDrivenDev on Thursday November 02, 2017 @12:53AM (#15607930)
I think you're not understanding what I'm saying. Luckily this person explained it better than I could.

https://news.ycombinator.com/item?id=15607598

Re:Data Classes for Java by wvenable on Thursday November 02, 2017 @02:23AM (#15608253)
I think I already addressed that point adequately here:

https://news.ycombinator.com/item?id=15607812

There simply isn't a better domain method term for moving data from one place to another than get/set. You could invent alternatives but they're just more confusing.

And even that linked comment addresses modification not retrieval. Sometimes you just want a value out of an object -- a getter.

I think understand the point that you're trying to make; the idea that an object just accepts messages that alter it's internal state but otherwise keep it completely hidden is a pervasive one. Exposing internal state can lead to coupling or violate the single responsibility principle. But that model is too simple, plenty of objects are just containers. And not dumb containers that are just bundles of simple fields but smart containers with data that isn't entirely internal.