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

How much code are you compiling? At Foursquare (with 100s of thousands of lines in our bigger servers) compilation times are awful. We're solving this by better modularizing, but it's a long journey.


Without significant use of sub projects (i.e. a highly modular and well thought out application structure), you're basically screwed on the compilation front. It's just absolute night and day the difference, compilation hit is reduced by orders of magnitude and development becomes enjoyable.

Will still be a compilation hit for very large projects, but less than with an everything depends on the kitchen sink approach, been through that pain point ;-)

My biggest gripe these days is with the presentation compiler in Eclipse, that can get pretty laggy when working with heavily inferred code, your own, or a 3rd party lib like Shapeless, Scalaz, etc. Not sure if IntelliJ is much better in this area, would be surprised, inference is costly.


While I won't defend the Scala compilation times, your complaints about modular application structure being ultra important for sane compile times is true for every statically typed language.

I completely agree with you with regard to presentation of code. A simpler language would allow for simpler error highlighting in your editor which would be especially valuable. Lots of languages also suffer from this problem though...


Ya, agree with everything you said. Unfortunately untangling a hairball is a bit harder than constructing one. Working on it though!


Admittedly, the largest Scala code base I've worked on was ~200K LOC size which is pretty small. But even that under a full compile/test cycle we were talking minutes in the worst case, dominated by test time. Incremental compile/test cycles were measured in 10s of seconds.

What do you mean when you say "awful" and how does that compare to your test cycles?


It's too easy in scala to create a giant mudball codebase where every file depends on half the project. Managing the compile graph is almost impossible when you have 20 hackers on the same codebase.

Sometimes I wish that scala had some compiler-flag that signals these problems, maybe a restricted mode or something with annotations.


I have not found that attribute to be significantly different in Scala than in other languages. That is, it seems to be a central problem with all of them.


I think you can speed things up a bit by manually entering the types of objects, in some instances.



I tried it, it's not flexible enough for my needs.


File issues and describe your use-case! :-) The author usually seems to be quite responsive.




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

Search: