Re:New language features since Java 8 to 17
by grogs on Sunday October 24, 2021 @04:33PM
(#28981625)
Scala 3 somewhat simplies implicits by the way. Especially w.r.t to extension methods, which are now a first class construct in the language: https://docs.scala-lang.org/scala3/reference/contextual/exte...
Re:New language features since Java 8 to 17
by jmfldn on Sunday October 24, 2021 @04:32PM
(#28981614)
It does require discipline, or at least one person on the team who can set a style guide for the newcomers to follow, this is true.
Re:New language features since Java 8 to 17
by erik_seaberg on Sunday October 24, 2021 @07:32PM
(#28982917)
Every worthwhile language brings important choices that require discipline. If there’s only one way to do anything, your experts’ code will be just as bad as your beginners’.
It can be used as a better Java but requires discipline. Things like implicits can easily cause an unnecessary amount of pain. Kotlin on the other hand implemented extension methods in a way that doesn't detract from the better Java paradigm. This is only one example though, there are many many reasons why Kotlin is more suited for the "better Java" role. Namely it's simply not that different to Java. It's effectively Java with a more modern syntax and polished extensions to the Java standard library.