Brand new Scala-lang.org
scala-lang.org
scala-lang.org
On a related note, does anyone else see the Scala logo and confuse it for a symbol representing databases or hard disks? It just doesn't click with me
The ubiquitous "segmented drum" database icon has had me wondering before. Presumably it's a depiction of some big old vintage hardware.
"Voy por la escalera" sounds fine to me if you're taking the stairs.
EDIT. Another example: when a building is divided in two stairs (left and right) we mark it as "Escalera Izquierda" and "Escalera Derecha".
Well, there are many excuses. Scala is a messy language* and I have Clojure which IMHO is a better alternative for JVM development.
I used both Scala and Clojure and settled with Clojure since it fits functional programming better. Scala is OOP with a bit of FP. Clojure if FP with OOP in case you need it desperately.
* "messy" as in "let's throw every feature we can think of into the language!"
> There's almost no excuse not to use Scala if you're deploying on the JVM.
s/deploying on the JVM/a Java developer/
There's also things like protocols, and Typed Clojure.
The typed module implements a static type annotation system and type checker on top of the dynamic language, which is nice, but that still doesn't mean Clojure is statically typed.
That said, Scala certainly ain't perfect. It's certainly got its warts. And I'm not going to compare it to Clojure, as I haven't played with Clojure enough yet ;)
Your discriminated unions would be "in drag" as case classes, of course. You would want to be aware of the OO parts of the language, but there's little that obligates you to use them.
Personally, if you don't have dependencies on java and if your goal is to do a pure functional application, I would stay away from the JVM as it just wasn't built for it.
As the language designer himself has said: Scala is not a better Java, it is not Haskell on the JVM. I would add that it isn't just SML on the JVM either. It is much better, in my opinion, to embrace Scala for what it is, a powerful, expressive, pragmatic language for industrial use.
My biggest problem with Scala, to date, is all the optional syntax. On one hand, making things optional sounds nice, and it can be handy... but in Scala, you can have a line of code where there are 3 or 4 different ways to write it. Sorry, don't have a good example handy, I'd have to go through my "learning Scala" workspace to dig something up and I don't have that stuff nearby. Anyway, the point is, I sometimes feel like Scala can easily lead to a situation where one is writing "write only" code. I do not relish the idea of taking a large base of Scala code, written by somebody else, and trying to understand it well enough to work on it.
Probably not if you want to keep that Haskell background. I feel Lisp/Haskell have very different philosophies and you might not like Clojure's.
OTOH, stepping out of your comfort zone is always a great way to expand your views (even if you hate Clojure at the end).
The new Scala website perfectly embodies the philosophy of the language which says that if you squish together many concepts and elements, each of which is good on its own, then the result simply must be good as well. ;)
Lots of garbage generation. I like Scala a lot, but the space where I can really use it is smaller than I'd like. I do really like it and Play for one-offs, though.
In practice, we have seen much much _less_ garbage created by our Scala code. The use of objects in Scala encourages static method creation, and there's so much boilerplate Java junk that your Scala code just doesn't need.
I really like the new site design, not all that bothered about the logo. Maybe Scala needs a mascot too :)
There is one incredibly good reason - possibly the most important reason. How easy is it to find a Scala developer if you need to expand your team compared to a Java developer?
I'd put it the other way around: what excuse do you have for spending more per developer? (There are some excuses here, but they're far from clear cut.)
In addition, Scala tends to run slower than Java which can have a further cost if you're scaling to many servers. Porting Java code to Android is also far easier than porting Scala code.
Regarding speed, I don't mind about the runtime speed as much as compile speed, runtime speed is getting very close to Java, and is much faster than popular dynamic languages, I think it's a great alternative to JRuby, Jython or Clojure in that aspect.
How easy is it to find a GOOD developer? Much easier with Scala. It's not like wading through hundreds of Java resumes and interviewing them is free.
> In addition, Scala tends to run slower than Java which can have a further cost if you're scaling to many servers.
This depends on so much different factors in both Java and Scala that I'm happy to dismiss this claim as “not true”.
> Porting Java code to Android is also far easier than porting Scala code.
Really? Is there anything more to do than ProGuarding and dexing the existing code, both in Java and Scala?
If you are programming in a functional paradigm you will be throwing off garbage, often when you wouldn't expect to from a cursory glance at the code.
You can mitigate it, but often to do so you have to resort to writing scala as java (which is still better than java as java).
Scala performance is on par with Java if you keep your wits about you, but you do have to be mindful of the code you write. Scala collections (esp. maps, doubly so for immutable.Map, but also mutable.Map) are (currently) slower than the standard Java collections, but it's easy to use an implicit conversion wrapping a Java HashMap with little to no overhead in the very small number of situations where this type of thing is a bottleneck. For comprehensions can also cause some overhead, so if you're really pressed for performance a while loops is always an option.
If anyone from typesafe/Scala is reading this: please bring the performance of mutable.Map on par with java.util.HashMap
If you have a large read-only map being read by multiple threads (doing random lookups) ju.HashMap leaves both mutable.Map and immutable.Map very far behind. Scala is great, but the Map performance lags.
I'm not the only one who has noticed. Try googling "Scala map performance vs Java"
The great thing about Scala's immutable HashMap is that in terms of concurrency it is worry-free. You couple it with an AtomicReference and presto, you've got a non-blocking, concurrent HashMap.
I work on a really high-volume web service that's built on top of Scala. The performance of Scala's immutable collections has been the least of my worries.
In most cases in which I need a while loop, I use a tail recursion instead. You can keep your code free of side-effects that way and the compiler generates code equivalent to a while loop.
Hear, hear! I can corroborate this statement and have benchmarked it quite a bit in the past. If you can mark a method as @tailrec in scala and the compiler does not complain, it will go as fast as if it were written with a while loop. And in many cases it will feel cleaner as well.
Of course, not everything writes itself nicely in a recursive style, for this you should use while if you need the performance. Don't be afraid, scala is after all a mariage between OO, functional and bits and pieces of everything nice. It's still there for a reason.
* the @tailrec attribute is not necessary but forces the compiler to complain when your recursive method is not, in fact, tail recursive. It's also good documentation that a developer who makes changes should keep it tail recursive because it's sensitive.
Scala does not run slower than Java. Period. Additionally, the very nature of Scala and Akka allow you to be much, much more efficient on the hardware you're using; if you're writing Java code that requires, say, 100 application servers, often times you can get away with half of that if you're writing good Scala/Akka code (and because of the nature of Scala, it's much easier to write good, solid code than it is in Java).
which is good and all, but i think most businesses (especially large corps who is hiring for an internal line of business product that is serving their real business) do not want to invest in their human resources this way =(
It is fairly hard to find a good developer, but once you find one you can tell him or her to write Scala or Java or OCaml or whatever you like.
I spent most of my 15 years working almost exclusively with Java shops that were often this specific. In working with Ruby, Python and Scala/Clojure shops over the past couple years, I find they are much less concerned with which languages you know today. I'm not sure if this is a function of a programming culture in these shops, or if it has more to do with the huge amount of Java developers available and the perception of more limited number of available talent in some other languages (do Python shops hire non-Python programmers because they 'have to'?).
On the question "do Python shops hire non-Python programmers because they have to?", from my experience the answer is Yes, but the reasons are twofold.
On one hand, yes, it is harder to find Python developers and it makes no sense for a company to restrict itself to such a limited pool.
On the other hand it is also a matter of culture - companies that use less popular technologies often do so for good reasons. Such companies are often looking for good developers in general. In my interviews the least of my concerns is the programming language the candidate used, when most people fail to satisfy me on questions like "describe the perils associated with concurrency and parallelism".
The companies focusing on Java that you speak of, on the other hand, have no need for good developers as they focus on quantity, not quality. For them it is far more valuable to hire replaceable resources.
In your opinion, do you think that the perceived focus on quantity over quality is representative of the culture of some Java shops or a function of the Java language itself (a necessity for more programmers due to the nature of the language)?
I've run one of the larger Java Users' Groups in the US (Philadelphia) for over 13 years, but I keep a very open mind on things, and I have been critical of elements of the Java space in the past.
And really, it's logical - if you want to build an assembly line, you pick a popular language for which you've got not problem in finding cheaper developers.
This isn't representative of all Java shops btw. And if you've got a different perspective due to your involvement in a JUG, you do have to keep in mind that people (or companies) joining a JUG do so because they want to be a part of a community, or for the learning experience, which is why JUG members are not representative.
I wrote an article about this last year (http://jobtipsforgeeks.com/2012/07/11/advice-from-a-jug-lead...) that goes into the sudden spike in interest for topics that were not Java language specific, and our transition into a group focused more around the JVM than just the language. This transition was driven by what I generally considered the unofficial though leadership of the group, who were gravitating away from the language. This is just around the time of the Sun acquisition when this became most obvious, which may have precipitated some of the changes.
Paradigm changes are difficult to handle, for example Lisp will be a little to grasp if all you have ever worked on is some thing like Python.
On the problem domain I'm working on, the concern of the programming language used by candidates is the least of my worries when looking for people. And yes, the people we are looking for are more expensive than average. But that's not because they can work with Scala.
- Poor tool support (refactoring regularly broken on both IDEA and Eclipse).
- Terrible backward compatibility story (want to use CoolLibrary v1.0, which was compiled with Scala 2.9 and you're using Scala 2.10? You're out of luck, you need the library to be compiled with the same version of the compiler).
- Very slow compilations, and getting worse at each version.
- The language is big (as big as C++) to the point where you must agree with your team on which subset to use.
- It's so big that nobody can agree on which idioms actually to stick to: pure immutability? Functional style? OO only? Use scalaz or not?
Shall I go on?
I like Scala, I use it every day on personal projects but putting it in production at work would be a terrible decision right now.
That being said, I would be willing to use it again. I didn't have an issue with compilation speed, and the size/flexibility of the language wasn't really a problem; we wrote in what I believe is the idiomatic Scala style (immutable objects, FP). Going back to Java now, I SORELY miss lightweight lambda expressions, pattern matching, native Option type (that people actually use), and the emphasis on immutability.
Upgrading my project to 2.10, several of the dependencies no longer compiled. I don't remember which ones specifically, but I believe one of them was a JSON library. We had to find libraries that fulfilled the same roles, then rewrite the code that used those libraries against the new APIs. It wasn't horrible in the sense of there being a nasty, hard-to-detect runtime bug, rather that it required basically redoing all of the "glue code" with respect to libraries.
This wasn't painful enough to scare me away from Scala in the future, though it does make me leery of using Scala libraries from anything but top-tier vendors. That is, I'd use a library from Twitter, FourSquare, TypeSafe, Akka, etc. but never again from anything not widely known.
So, what do you actually mean when you say, "The language is big (as big as C++) to the point where you must agree with your team on which subset to use"? Like you, I work in Scala daily and have never thought, shit, oh no, here we go again, the dreaded subset problem.
"It's so big that nobody can agree on which idioms actually to stick to: pure immutability? Functional style? OO only? Use scalaz or not?", use it exactly like Java...until you don't. Scala is not Python, there are many right ways to use the language.
The Scala-is-slow mantra is trance inducing, I agree, you just hear the phrase and voila, it's slow. Modular development (i.e. sub projects) largely mitigate the Scala-is-slow noise. Incremental builds are of course snappy, scalac and SBT have made great strides in this area, and SBT 0.13 furthers this trend (debunking the "getting worse at each version" nonsense).
According to Odersky Scala 2.11 will include [paraphrasing] aggressively stripping out unused/extraneous language features and improving compilation times.
Agreed on IDE support, it will come around, ScalaIDE has improved a ton during the past year (avoiding Juno helps).
I see the Scala glass as neither half full, nor half empty -- it's overflowing, future is bright ;-)
You could file bug reports with Jetbrains to have them fix any issues you can reproduce. They're generally pretty good at following up and working on bug reports when I have filed them myself.
Alternatively, tell me what the particular bugs are and I'll try to reproduce them myself and then file a bug report(s) if you don't wish to. I use their Scala plugin quite a bit and while I don't think it's quite as good as their Java support yet, it's the best I know of for a Scala IDE.
Poor tool support: I haven't had issues with IDEA refactoring
Backward compatibility: upgrading apps is usually not too hard, and from 2.10 onwards BC shouldn't be such an issue
Slow compilation: if you are working on very large programs anyway I feel sorry for you - we try and keep our services small and simple and compilation time isn't an issue
Language is big: depends what you compare it to. But choosing a subset doesn't seem necessary. Just make sure people have read one or more of the various good style guides around (the Twitter Effective Scala one for example, or Odersky's recent talk from Scala Days)
- Ibid. You should be using a functional style, but leveraging OO (case classes really). Although I do sympathise that Scala is more complex here.
Some of the points you raise have merit (mostly the ones related to complexity) but unless you are using a Lisp they are almost certainly true for your alternative language (such as Java, C++ etc.).
But lots of people successfully use Scala everyday at work. The organisation I work for has pretty much moved entirely to Scala now (from mostly a Java base) and we have about 60 devs. So it definitely can be done. And I haven't found a single person who wants to go back to Java.
There's a good reason, actually - library maturity, especially when trying to get data in and out. Try and do some inner joins with typesafe slick and you'll know what I mean when you see the SQL it generates.
Or try and use Play Framework's json de/serialization, and be prepared to punch your monitor in the face.
I think these critical libraries can get there, but the lack of resources on these projects has me thinking we'll be waiting awhile.
Think Scala Pickling by Sara Miller at TypeSafe looks excellent for serialization needs.
(It's Heather Miller from EPFL, though.)
There's a macro that will take an entire object, generate the converter and do the conversion in one line of code, but it won't let you choose which fields not to send. So your list of users get their password hashes sent too.
For deserialization I just do it manually by pulling the fields out of the objects sent.
The dev could be a lisper.
Do you really believe that or just being flippant?
Scala seemed a perfect fit. Until I looked at job boards for Brisbane :(
For those that use it regularly, what sort of things do you build in.it? I really want to replace PHP with something, but between Enterprise Language Java and just-as-dynamic-as-PHP Ruby and Python, Scala looks like the only language that might fit... but then Play as a framework looked very heavy for my usage.
Disclaimer: I found it so refreshing and awesome that I'm now a Lift committer.
> Play as a framework looked very heavy for my usage
What do you exactly mean by heavy? Actually I think it's quite simple since you only have to download an archive, unzip it, and start writing code as you would in any MVC Web framework.
Spray.io is great for building API. It usually has better performance than Play.
Scalatra is Scala's Sinatra, but the compiling times take out all the joy in using this kind of frameworks.
Another Scala Web framework is Lift, but I don't know much about it.
The terms "lightweight" and "heavyweight" and variants get thrown around alot describing frameworks, but can mean different things to different people:
- size of framework codebase
- size of app codebase
- amount of code it takes to accomplish common tasks
- memory footprint
- deployment system
- learning curve
- feature list (barebones vs kitchen sink)
etc etc. If you could elaborate a little on what heavy and lightweight you're referring to, the Lift/Play/Scalatra/etc experts might be able to better address that.
My thing is, Play seemed to do literally everything. I think it would be brilliant if I knew Scala well, but my problem is I dont even know Java! Ill use that as a segue: I had the same issue with Groovy/Grails -- great framework, nice language, but my lack of Java experience hasn't.made things as productive as I expected based on the hype I've seen.
Play simply seemed like I was learning Play, not Scala. I felt the same way when using Rails, which I never took too. The only larger more fully featured framework I've used and enjoyed is Symfony2, and that is solely due to my expertise in PHP.
I hope that helps explain what I meant. What should I do?
Started with a few pleasant months of pure Groovy, followed by 6 painful months with Grails (during the pre 2.x days). At that point I had my feet wet and realized that Groovy, as language, was not going to cut it (tried building a CRUD layer on top of Grails and Groovy's lack of static typing became a real thorn).
At the time James Strachan had ditched Groovy (the very language he had created, mind you) and was raving about the wonders of Scala. Interested I picked up the stairway book, Programming in Scala.
That changed my life as a programmer. Checked out Scalatra, Spray, Lift, and Play. Play wound up being the best fit.
I still get JIRA notifications for bug requests I created with Grails -- each one the devs just kick the can down the road (fix) to the next version, glad I left ;-)
"Shared constraints not working in URL mappings Fix Version/s: 2.3-RC1 (struck through) Fix Version/s: 2.3-RC2 (the kicked can)" ;-)
As for not knowing Java, there's not a whole lot of carryover from Java at the language level. There is at the JVM level obviously, but you can ignore JVM tuning and bytecode and whatnot till later.
In fact, I actually found learning Haskell to be more valuable than Java in understanding Scala. Learn You A Haskell [2] is one of the best general programming books I've read, Lipovaca is excellent at explaining complicated functional programming concepts.
[1]: http://scalatra.org/
Try Scalatra.
On the job boards problem - the funny thing in this industry is that you're more likely to find jobs because you use a certain language that's not as popular as Java or PHP.
It's a supply and demand issue. Yes, there are many jobs for Java and PHP. But there are also many PHP and Java developers. And as a general rule of thumb, for finding good jobs smart developers focus on skill-sets that are much narrow and harder to practice than usage of a programming language.
Focus on scalability issues, on design, on social skills, on data analysis - people that are good at such things are worth their weight in gold.
Time to start learning Scala properly, it seems. :|
But if you are already familiar with functional programming, data structures, etc., then it will be straightforward as Scala has a nice syntax - at least, it does for a C-style language.
On the frameworks debate, I've found in the past that trying to use a large framework and learn a language at the same time is just too difficult because you are overloading the learning. Sticking to Scalatra here might help because you don't need to work hard to understand the framework, so you can focus on making your app and learning Scala. Play is probably nice once you understand it, but they'll be a lot more domain knowledge needed to use it effectively.
Part of the problem is probably that sbt is basically every build tool combined into one.
This comes as a (personal) advise to all my fellow startups here.
Dear dudes and dudettes,
I've been a long and hard fan of the 'Get shit done' mentality and I still am. From my past experience running Rails and Scala, I'm going to tell you what exactly you should do for your startup:
1) If you KNOW FOR SURE your startup will face a lot of page views, requests etc. before hand (Example - Real estate portals like Airbnb, Trulia, etc), then you should not make the serious mistake of ignoring high performance frameworks beforehand. This could literally be anything, but the alternative I personally recommend is something Scala based [Read section 4 for WHY].
2) As usual, use Rails (or django/similar) ALWAYS to build your v1 prototype. I say always because you will be incredibly surprised to see how much rails gets stuff done for you. While this is a huge advantage initially, this can also become a nightmare, later. Hence, I suggest you use rails only initially and not forever.
When you build your app with rails initially, you're overcoming the most irritating pain point (or I'm just too lazy) - Building the database. Building the database with the required fields manually can be tiresome, if not slightly dangerous (assuming you are inexperienced). So, I suggest you install devise:
gem install devise
And implement authentication through it. Why? Because Rails+Devise will create some useful columns for you auto-magically - created_at, updated_at, sign_in_count, etc. (to name a few).3) Now, you NEED to understand what's happening underneath devise as this is one of the core portions of your app. For this I suggest this rails cast:
http://railscasts.com/episodes/250-authentication-from-scrat...
Now that you understand how the most important part of your app works, you should start to build a clone of your v1 on your desired high-performance framework of choice. I use Scala personally (and I would recommend you too).
4) So, Why Scala?
#Scala has a decent minimal syntax compared to Java, PHP and the rest.
Scala:
def test = {"hello world"}
PHP:
<?php echo "hello world; ?>
Java:
class HelloWorldApp {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}
# Generally, on an average, 1 line of Scala = 10 lines of Java. That's less maintainable LOC (it can be argued otherwise, but just assume it's a good thing)# Performance. Now this is where Scala really shines. Scala's base performance is almost near Java's in most real world scenarios. You get the benefit of Java without actually using it. How fast is Scala in contrast to Ruby? Well:
1 JVM = 10 thins ("Rails is meant for a toy blog engine" - Soundcloud)
Source: http://www.slideshare.net/pcalcado/from-a-monolithic-ruby-on...
Approximately 20-40x faster: http://www.techempower.com/benchmarks/#section=data-r5
#Inter-operability with JAVA. This is a HUGE plus. While everyone loves to bash Java, you should not forget that it's a tried and battle-tested enterprise backed language. It's horrible (arguable), but reliable. So, this means, you can use that high performance image-processing function written in Java you always wanted by calling it from within your scala code NORMALLY. Now that's why I prefer Scala over newer languages like Go (It's really good, but the library support is still growing). Don't under-estimate this use case. Some secure functions used for authentication are available on various implementations on the Java land, compared to Go, etc.
---------
5) So if you use Scala, there's a lot of alternatives for frameworks out there. The most popular ones are Play, Lift and Scalatra.
Play - Claims to be Rails like, but not even close to it. You need to work out everything on your own. Some stuff is still buggy and some are still scary (implementation of security functions). Stateless.
Scalatra - Sinatra for scala. Minimal, super-fast, awesome. (I personally recommend this). Stateless.
Lift - Tried and battle tested, used in production by so many popular guys (Foursquare for example). HUGE learning curve and too heavy for a framework. A hell lot of stuff is done automatically for my taste (like generating it's own login boxes with forgot password links, for example).
Performance comparison of all three frameworks here:
http://www.techempower.com/benchmarks/#section=data-r5
Note: Scalatra is the fastest (for most use cases) of them all.
6) Now, write a clone of your app in your framework of choice. Use the v1 Rails prototype initially to get your investors, clients, etc. But, by v2, ship out the code on Scala. This means,
#Reduced costs (1 app server vs 10 app servers)
#More time to focus on business activities and a LOT more time before you need to start worry about scaling (the framework)
Pls note: The above point isn't true if your app is db constrained.
Database suggestions:
Please ignore the noSQL hype. noSQL is DAMN GOOD for prototypes (use it for your v1) and for specific production use-cases. 99% of the use cases are covered by SQL. And the noSQL hipsters have created a terrible image for SQL databases that they don't scale, etc. But it simply isn't really true. Even something as basic as MYSQL scales pretty well. As documented by Quora's founder here:
http://www.quora.com/Quora-Infrastructure/Why-does-Quora-use...
Also, noSQL isn't a golden solution: http://blog.engineering.kiip.me/post/20988881092/a-year-with...
Some popular questions:
1) Scala engineers are difficult to find and hire
This is partially (in)correct. If you face issues with your Scala code OR if your scala code is the bottleneck (highly unlikely), then you can always hire a good Java developer and have that particular function/code module re-written in JAVA. Java developers aren't difficult to find. Also, If you made the transition from Ruby to Scala, so can anybody else.
2) The productivity gain vs Performance gain
If you write your app in rails, you get a lot of productivity benefits, at the cost of performance. If you write your code in Scala, you lose your productivity at the gain of extra performance. So which one should you choose?
There is no doubt that Rails scales really well. But, out of the box, it is slow. Imagine it this way:
There are two ways to make a sculpture - Using plastic (Rails) and using metal (Scala/Go/etc). Sculpting a metallic structure is hard (ignore molding techniques). Sculpting plastic is easy.
But if you stress the plastic sculpture, it simply breaks out. There are lots of commercially available metallic coatings for your plastic sculpture that will promise you of no breakage etc. (SOA, Scalable PaaS like Heroku, etc.)
But they are expensive, and they don't eliminate your pain points as promised. At some point you or an engineer is going to worry about the code. Better be it you and now than someone else, later.
It is important you understand what goes under a framework's Magic (like authentication, database calls, etc) than just blindly believe it to be magic. This will not only make you a better developer, it will also help you from being taken advantage of by your outsourced companies or your engineers.
--------
I just poured out everything from a personal stand point. Frameworks are a matter of personal choice - You choose whatever that resonates with your philosophy. So, at the end of the day, be sure to go with whatever makes you happy (and confident).
All the best.
One small picky thing:
> Scala: def test = {"hello world"}
Can be actually
def test = "hello world"
:)p.s. you can play with Scala code live in the browser here:
http://scalatutorials.com/tour/ (work in progress)
scala> def test1 = println ("hello world")
scala> def test2(f: =>Unit) = println ("hello world")
scala> def test3(f:Unit) = println ("hello world")
scala> test1
hello world
scala> test2()
hello world
scala> test3()
hello world
scala> val t = test2 _
scala> t apply Unit
hello world
scala> t()
hello world
scala> t(())
hello world
I will leave it as an exercise to the reader to distinguish between these thunks :)See also this question: http://stackoverflow.com/questions/8303817/nine-ways-to-defi...
It can go quite crazy on function definition styles:
val add:(Int,Int)=>Int = _ + _
(from http://scalatutorials.com/tour/12_tour_of_scala_anonymous_fu...)># Performance. Now this is where Scala really shines. Scala's base performance is almost near Java's in most real world scenarios.
Scala's great, but don't overhype it. I just finished re-writing a mid-sized (~30k LOC) API app from Java (Play 1) to Scala (Scalatra). In this case the code size was reduced to about 40% of the original, but we needed about 50% more CPU and 100% more RAM to get comparable performance.
It was still well worth it - aside from the reduction in the size of the code there are additional maintainability benefits from immutability and other nice aspects of idiomatic Scala.
Scala is wonderful and all the hard work put into it is greatly appreciated. However, every Typesafe product targeting the web that I've tried has given my browser indigestion.
The 3771 DOM elements composing the front page may be the cause.
Luckily the api docs and tutorials are unaffected and load quite quickly.
Object Oriented Programming: Everything is an object
Function Programming: Everything is a function
Scala: Everything is a function and an object both
Good job!