Skip to content

Do you still use quarkus (hibernate) with lombok? #43776

Answered by yrodiere
Paul6552 asked this question in Q&A
Discussion options

You must be logged in to vote

Everything I always learned about programming "Encapsulation of objects" is thrown overboard.

If you want to do true object-oriented programming and encapsulation, then I'm afraid hiding field access behind getters and setters is not it.
If you wanted true encapsulation, you would not have getters and setters, but you'd have meaningful, business-related methods, e.g. person.marry(otherPerson), person.giveBirth(otherParent, firstName), etc. Which I hope you're starting to see is not exactly practical.
With getters and setters, your fields are not encapsulated, they're just accessible through an additional -- arguably annoying -- layer of ceremony. You can still get and set their value an…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by cescoffier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
area/hibernate-orm Hibernate ORM
2 participants