Daniel Lemire's blog

, 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. Yuval says:

    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.

    1. 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…