Live data from Hacker News

Why Learn Scala in 2013?

blog.typesafe.com

21–30 of 75 posts

Re: Why Learn Scala in 2013?

#21
post #3

I've looked at Scala. I think it's really neat. I think it is Perl. And that's what scares me. You can solve the problem in many ways, each one getting more functional and abstract. Eventual so abstract that you can't really tell what going on. Another issue is the fact that it interacts with the JVM. Short answer, it seems nice, but if you're functional, you can't really use the 3rd party libs because you can't be s…

I had a job where we needed Java interop but wanted to do functional programming. The whole team ran on Scala, of course.

I hate to speak the Word of Curse, but this was why we used monads. They gave us something of an effect-typing system in which to wrap calls to side-effecting third-party libraries.

Re: Why Learn Scala in 2013?

#22
post #8

When I first encountered Scala, my impression was that this would be Java 2.0. Two plus years later, that's still my impression. What this means to me is that if you are looking for a new work-a-day language (i.e. the language that you use to pay the bills; the ones that appear in the Tiobe top 25), then Scala is probably worth a look. However, if you are happy with your current working language and are, instead, loo…

I like Scala and didn't personally find it that hard to start using it but I'm not optimistic about its future as a mainstream alternative to Java. It's just too big and complex and (apparently) too GC heavy to be useful on what is quickly becoming one of the most important Java environments (Android). My money is on Jetbrains' Kotlin as a significant but manageable step forward from Java. Given its pedigree I expect…

Wow I never heard of Kotlin. There was a presentation about it at Devoxx but since I didnt visit it.

Looks like a simple yet powerfull language. While still remaining type safety. Going to look into it!

Re: Why Learn Scala in 2013?

#23
post #5
post #4

Can anyone recommend a good book on Scala? Or should the documentation be enough?

Programming in Scala - http://www.artima.com/shop/programming_in_scala_2ed For more links, visit http://typesafe.com/resources

besides staircase book (the one from Artima.com:

the other good starter book: http://horstmann.com/scala/

detailed looks, all angles: http://www.manning.com/suereth/

Re: Why Learn Scala in 2013?

#24
post #4

Can anyone recommend a good book on Scala? Or should the documentation be enough?

Bruce Eckel is releasing a book this year on Scala, Atomic Scala: http://www.atomicscala.com/

Eckel's Thinking in Java was a classic, I suspect he will this one out of the bag too.

The Odersky book is good as a reference, but not a great teaching tool, its too big. I watched the video lectures, they're quite good if a little dry and occasionally quite abstract especially if you're trying to apply Scala to real world problems.

Be warned though interop isn't perfect between Java and Scala, sometimes you have to resort to tricks to make things work, Hadoop APIs being a good example.

Re: Why Learn Scala in 2013?

#25
post #18

Earlier quoted context omitted.

It's too bad sbt isn't actually simple and is generally a disaster. I did scala in IntelliJ. The lack of tooling reduces the value a lot. I almost prefer plain java over the sheer simplicity it has comparatively...

I tried IntelliJ, but the Scala plugin had a lot of bugs. Eclipse on the other hand is pretty good now: http://scala-ide.org/ Personally I find the SBT Scala file much simpler than a Maven XML.

As an former Eclipse user I had to switch to IntelliJ for the last 4 months and use it on a daily basis. I was very surprised how well the Scala plugin works. Excellent code completion, code search and refactoring options. I tried also Scala IDE in the Coursera Course and think the overall development experience of IntelliJ (with Java and Scala) is much better.

Re: Why Learn Scala in 2013?

#26
post #19

I really like Scala. But i have some thoughts on this article: - Its not objective: It's from Typesafe. Logically they are not going to mention the negative sides of Scala I used Scala myself and I think it is a very good approach to combining functional, imperative, object oriented and type safety in one language. But the big downside is complexity: Scala is utterly complex, its has all the features of java. But it…

I'm not disagreeing about the complexity, but you can choose to use a sane subset of the language and do away with all the other stuff. Map, filter, anonymous functions and type inference already puts it way ahead of Java in terms of productivity. You can absolutely choose to ignore the rest of the language.

In the end a language like lisp is much simpler but the paradigma shift is what makes it a bit difficult for those imperative programmers like me.

It's not very fair to compare Scala with Clojure - static typing might not be everyone's cup of tea, but over time, I have come to appreciate it's power when dealing with certain classes of problems.

Re: Why Learn Scala in 2013?

#28
post #10
post #9

I haven't looked at Scala lately. Has the compile speed of Scala improved? Is it comparable to Javac now?

No, it's very slow. If you use a SSD, it's manageable.

One thing I've found helps a LOT is encapsulation and return type annotation.

If you change a public method, SBT will recompile all users of that class even if they don't use that method. If you change a private method, it's smart enough to recompile only the one file.

Annotating your return types both saves the compiler the effort of figuring out what you meant, and also prevents you from accidentally changing the return type and forcing recompilation of a bunch of client code.

Post reply on HN