3 ms·
Not only that, the order of fields in a Java class does matter despite what that link claims. It's common to use Lombok to automatically generate constructors,
by soraminazuki 2y ago
Not only that, the order of fields in a Java class does matter despite what that link claims. It's common to use Lombok to automatically generate constructors, and "the order of the parameters match the order in which the fields appear in your class."
https://projectlombok.org/features/constructor https://projectlombok.org/features/constructor
The first two kinds of conflicts that Mergiraf handles looks somewhat dangerous to me when handled by a computer.
https://mergiraf.org/conflicts.html https://mergiraf.org/conflicts.html
- wetneb 2y agoLombok is an interesting example, but yes, just with reflection you can already get order-dependent behaviors as the docs note. I've been thinking about giving users more control over this commutativity, but it's not clear to me what it should look like. A strict mode where commutativity is disabled entirely? The ability to disable certain commutative parents?
- andrewaylett 2y agoCode that uses Lombok features which change classes (rather than subclassing them) might have a high degree of similarity to Java, but it's not Java.