Live data from Hacker News

Reasonable Scala Compiler

github.com

21–30 of 161 posts

Re: Reasonable Scala Compiler

#21

I'm a bit confused. I have been told multiple times by Scala users that Scala compile times are a non-issue.

Depends on the size of the code base, how good your incremental compilation is, and what percentage of the code changes frequently. At Twitter the values are: large, great, and relatively high.

Re: Reasonable Scala Compiler

#22

It will be interesting to see what the subset is. I have been writing scala for 2 years, mostly in spark and flink and as much as I love parts of it, overall, the language is just not the most approachable. Some of the features are super valuable every once in a while, but I might gladly give some of them up for a streamlined language that is easier to get people started on (while not just writing imperative style Ja…

Historically anything with heavy use of implicits is embarrassingly bad for compilation.

Re: Reasonable Scala Compiler

#23

Earlier quoted context omitted.

Funny you should mention Kotlin, as it's the result of JetBrains doing just that: developing their own language to write their apps. Mozilla represents another successful example with Rust. I'm of the opinion that developing new, purpose-built languages (or extending existing ones) is a strategy that isn't given as much consideration as it should.

Jetbrains is a compiler/IDE company, they have the expertise to do such task. What will Twitter gain from this endeavor?

developer productivity.

Re: Reasonable Scala Compiler

#24

Earlier quoted context omitted.

Funny you should mention Kotlin, as it's the result of JetBrains doing just that: developing their own language to write their apps. Mozilla represents another successful example with Rust. I'm of the opinion that developing new, purpose-built languages (or extending existing ones) is a strategy that isn't given as much consideration as it should.

Jetbrains is a compiler/IDE company, they have the expertise to do such task. What will Twitter gain from this endeavor?

1) Twitter certainly has the right engineers to do this.

2) If they can speed up Scala compile times by 5 minutes a day (extremely conservative -- compilation times tend towards 1s per file), across even 1,000 developers (Twitter had around 2000 when I was there) that immediately funds a 5+ person development team. This isn't the sort of thing you throw a huge team at, anyway.

3) It helps with recruiting talent who is looking to work in environments that have strong type safety, or who just want to work for companies willing to invest time in making their software engineers more productive.

Re: Reasonable Scala Compiler

#25

Earlier quoted context omitted.

It's not a new language, it's a reduced subset of the same language.

You're playing with words. They are creating their own language which is a subset of Scala, and they decide which features to keep based on whether they are fast enough to compile. The point is: developing your own language to ship your apps is crazy.

Insane choices start to look very rational at sufficient scale.

Re: Reasonable Scala Compiler

#26

Twitter is not performing well as a business. It is also at almost all time low. Should it be working on a new language/compiler?

Maybe it was a business deal. If you start seeing Martin Odersky retweeting Justin Bieber a lot going forward, you'll know what's up.

Re: Reasonable Scala Compiler

#30
> Identify a subset of Scala that can be compiled with reasonable speed

I am afraid of Scala fragmentation. There is no way new compiler can be 100% compatible. Hopefully it will be tested on major projects, or there will be some official Scala Language spec.

It would be nice to add a switch into old scalac, which downgrades its features, to make it compatible with new scalac.

I believe Scala has too many features, and it will be very difficult to fix compilation speed. But there could be decend boost just by rewritting compiler from scratch. If anything we will get better error messages.

Compilation speed was major reason why Jetbrains started Kotlin.

Disclaimer: I worked with Scalac / IDE back in 2009. Kotlin fanatic.

Post reply on HN