DEV Community

Discussion on: Modernizing Java - A language feature wish list (Part 1)

Collapse
 
lluismf profile image
Lluís Josep Martínez • Edited

Public properties
Even when Sun defined core J2EE patterns (a couple of decades ago) recommended using public properties for transfer objects (aka DTOs) check this oracle.com/technetwork/java/transf... Maybe your junior dev read that !
I don't say it should be used blindly, but in this case IMHO is acceptable. In other cases (Hibernate for instance) is a requirement to implement lazy initialization.