News for hackers. Stuff that matters.
Re:Java 8: New features in ConcurrentHashMap by merb on Wednesday January 18, 2017 @02:27PM (#13429495)
well if you don't need hashCode, copy, toString etc you can use:

    final class Data() {
      final int id;
      final String name;
      public Data(int id, String name) {
          this.id = id;
          this.name = name;
      } 
    }
No need for getter/setter. Still not as good as the scala one tought, but probably a little bit faster since it does not use accessor methods.

P.S.: I'm a scala user.

Re:Java 8: New features in ConcurrentHashMap by lmm on Thursday January 19, 2017 @07:26AM (#13435212)
For the sake of comparison the Scala equivalent of those 8 lines is:

    case class Data(id: Int, name: String)
and comes with all the other things merb mentioned. And it's unlikely to be any slower in practice since the JIT can inline the access (not that method calls are ever likely to be a noticeable overhead anyway).