Records Come to Java
(blogs.oracle.com)
smallufo
積分 0
That is, the toString() method (as well as equals() and hashCode()) is implemented using an invokedynamic-based mechanism. This is similar to how string concatenation has also been migrated to use invokedynamic in recent Java versions.
這是唯一吸引人的地方,也是目前 kotlin 做不到之處。這算 Oracle 的後發者優勢吧。