Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Java's type system is barely doing anything for you in comparison with what Scala does. Higher kinded types, implicit parameters, implicit conversions and type inference are not free. The type level tools that libraries like Shapeless use let you do type checks that are unimaginable in the java compiler.

Guess what: The more work a compiler is doing, the slower it's going to run. Comparing Java and Scala compilation is like comparing the gas mileage of an 18 wheeler truck and a small city car. Guess what? The 18 wheeler won't do 30 mpg.



The scala type system is incredibly strong (and undecidable) but the implementation itself is not conducive to compilation speed. Two of the primary motivations for Dotty are 1) reducing the complexity of the language and 2) starting clean slate on a more reasonable compiler.

Im of the opinion that most groups don't want the complexity that scala brings, and we're going to see that in the community growing around spark. The databricks style guide clearly avoids a lot the complexity of the language, and the people who are coming to scala for the tech and not the language are going to follow their lead.


I agree the Scala compiler has more to do. (Although Java now does type inference.) But I'm like any user: greedy. I want it all and I want it fast ;)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: