Comment Comment by javanonymous I think named parameters would be a great additionFor now, I use Lombok's @Builder annotation. It makes it much easier to create and copy a record, where non-assigned attributes are set to default.Example: var bmw = Car.builder().make("BMW").build() It also has a practical toBuilder() syntax that creates a copy of the original record, with some attributes changed var other = bmw.toBuilder().year(2024).build() parent javanonymous 2 years ago
For now, I use Lombok's @Builder annotation. It makes it much easier to create and copy a record, where non-assigned attributes are set to default.
Example:
It also has a practical toBuilder() syntax that creates a copy of the original record, with some attributes changed