Scala is a large and complex language. In my experience, the best way to learn such a language is to read really good code. Are there any open source examples of such code? What can you recommend?
Asked
Active
Viewed 9,777 times
19
-
1Take a look at some popular projects [here](https://github.com/languages/scala). – missingfaktor Jul 06 '12 at 12:31
-
@missingfaktor : This link is broken. Could you please provide another link ? – fahim ayat Jul 15 '14 at 08:25
-
@fahimayat, I wonder if they removed the feature where one can see projects in one specific language. – missingfaktor Aug 15 '14 at 17:48
-
@fahimayat You can look at trending github scala projects [here](https://github.com/trending?l=scala&since=monthly). – Tim Dec 28 '15 at 16:14
2 Answers
10
Scalaz. Be aware that it's written in a far more functional style than most Scala code.
Twitter Util (already mentioned in @axel22's answer).

Alexey Romanov
- 167,066
- 35
- 309
- 487
8
The Scala standard library should be pretty idiomatic in most places. The Scala Swing library is another example.
Usually people who write various frameworks know what they are doing and are experts in Scala. Frameworks such as Akka or Play are good examples of this. Twitter's projects are another.

axel22
- 32,045
- 9
- 125
- 137
-
1In my experience much of the standard library is pretty imperative (presumably for performance reasons). – Travis Brown Jul 06 '12 at 13:05
-
True, stdlib is sometimes very imperative. Nevertheless, there are some idiomatic patterns regarding style being followed there: class and a companion only per a file of a same name, using the cake-pattern to mix functionality together, combinator-style interface (parsers), etc. – axel22 Jul 06 '12 at 14:50
-
1IMO, stdlib and compiler are bad examples, since they aren't typical of what other programmers do in their everyday job. – Konstantin Solomatov Jul 06 '12 at 15:11
-
1And, besides what the others said, it contains lots of code that were written very long ago, and lots of code written by PhD students with not much Scala programming experience. – Daniel C. Sobral Jul 07 '12 at 00:57