22. Scalaのメリット 1. 少ないコード量で生産性向上 n 例 Javaの例 List<User> list = new ArrayList<User>(); list.add(user01); .... Collections.sort(list, new Comparator<User>(){ @Override public int compare(User o1, User o2){ return 01.id - o2.id; } }); Scalaの例 val list = List(.... User ....) list sort (_.id < _.id)
![Scala稟議の通し方(公開版)](https://cdn-ak-scissors.b.st-hatena.com/image/square/c8507c22f673300b7edcf75f9be8de71a3629590/height=288;version=1;width=512/https%3A%2F%2Fcdn.slidesharecdn.com%2Fss_thumbnails%2Fscala-131019203511-phpapp02-thumbnail.jpg%3Fwidth%3D640%26height%3D640%26fit%3Dbounds)