, 1 min read
Synthesized hash functions in Swift 4.1 (and why Java programmers should be envious)
2 thoughts on “Synthesized hash functions in Swift 4.1 (and why Java programmers should be envious)”
, 1 min read
2 thoughts on “Synthesized hash functions in Swift 4.1 (and why Java programmers should be envious)”
Just a comment that most Java IDEs (e.g., IntelliJ) would generate for you sensible default equals and hashCode methods if you ask them to.
The Swift approach of generating implicit defaults might be preferable. Less code, less clutter. As long as the defaults are good enough that you never have to worry about them…