News for hackers. Stuff that matters.
Re:From zero to 10M lines of Kotlin by sorokod on Tuesday October 25, 2022 @03:07PM (#33334840)
> built-in optional typing

Typing is not optional, everything in Kotlin is typed. What the language has is type inference. The following lines have the exactly same types:

  val teens = people.filter { it.age < 20 }.map { it.name }
  val teens: List<String> = people.filter { p: Person -> p.age <= 20 }.map { p: Person -> p.name }
Re:From zero to 10M lines of Kotlin by kaba0 on Tuesday October 25, 2022 @03:42PM (#33335217)
Just for comparison’s sake, java is not significantly more verbose.

  final var teens = people.stream().filter(p -> p.age < 20).map(People::name).toList()
Re:From zero to 10M lines of Kotlin by LinXitoW on Tuesday October 25, 2022 @06:38PM (#33337114)
Keep in mind, you can use Kotlin in any JDK8 project and instantly get all those features. What you're proposing requires upgrading to a new JDK.
Re:From zero to 10M lines of Kotlin by lmm on Tuesday October 25, 2022 @10:39PM (#33339131)
Upgrading to a new JDK is significantly less work than upgrading all your tools to support a new language.
Re:From zero to 10M lines of Kotlin by kaba0 on Wednesday October 26, 2022 @01:27AM (#33340141)
JDK 8 came out in 2014 - Internet Explorer was still widespread at the time.