Re:Kotlin: A New Hope in a Java 6 Wasteland
by lmm on Tuesday September 29, 2015 @02:52AM
(#10294932)
It's not a language-level feature. It's a pattern that makes use of several features - type members, structural types, member selection. (You can often write these things more readably by splitting them onto two lines, putting the type alias in one place and the use of it in another, avoiding the need for the structural type and member selection). It's like the visitor pattern in a language that doesn't have pattern matching, or an explicit Y combinator in a language that doesn't have recursion.
Some newer languages have this kind of functionality (in Haskell it's a GHC extension, I think).
Some newer languages have this kind of functionality (in Haskell it's a GHC extension, I think).