Conversation

I wrote a little Java today. And for a C++ dev, of the more modern variety, those new’s were painful: Timer timer C++ brain: Ah that’s good. Timer timer = new Timer(); C++ brain: Oh no, baby, what did you do???
Whatever Judgingyou GIF
GIF
11
70
Replying to and
It's hard to get used to the == and != operators checking object identity for non-primitive types. It's also quite annoying that Object provides an object identity implementation of equals to everything by default. Hard to express how much I dislike class inheritance in general.
2
2
The next problem is that java.util.Arrays.equals will call the equals method for each element in the array so of course that doesn't work properly for nested arrays due to the messed up equals implementation. So, you need java.util.Arrays.deepEquals to deal with that. Sigh.
2
2