3 ms·
Alt insert generate equals method, select fields, ready. Or use a record. It is such a minuscule part of the language, that it simply doesn’t matter compared t
by kaba0 6y ago
Alt insert generate equals method, select fields, ready.
Or use a record. It is such a minuscule part of the language, that it simply doesn’t matter compared to every other line of code, lib, ecosystem. You may imagine how much more productive you are that this language has sane equals, but it is not even a reasonable constant factor.
- chriswarbo 6y ago> Alt insert generate equals method, select fields, ready. This sounds like you're not programming in the Java language, you're programming in some sort of graphical macro language which compiles down to Java (presumably built-in to an IDE of some sort?). The fact that people resort to such things is evidence that this is a valid criticism of the Java language.
- kaba0 6y agoFor data only classes, records are an existing solution. For non-data classes you have to specify what equals means. Is two database connections to the same db equals? No, even though they may have the exact same fields.