Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm interested in learning Scala. I've been reading a lot about it, but a lot of people value it because it has an actor model which is better for concurrency, it handles xml in a much better way, solves the problem of first class functions.

My question is do you need to know Java to understand/appreciate the way things work in Scala? Is it better to first take a stab at Java and then try Scala or you can start Scala with absolutely no java backround?

share|improve this question
4  
Do you need to a biface in order to appreciate how saws work? :D –  back2dos Nov 21 '11 at 11:14
    
lol, I would upvote this answer. –  gizgok Nov 21 '11 at 12:02

2 Answers 2

up vote 14 down vote accepted

Scala is its own language, and by itself doesn't require knowledge of any existing languages. If you wanted to, you could learn Scala as your first language. On the Learning Scala page of their website, there are entry points to the tutorial for different levels of experience, ranging from first-time programmers to programming language researchers to functional programming experts.

Most of the documentation is focused on people who know how to program, unfortunately, but I've actually worked through some of the Scala tutorials. It's not that bad. It's expected that you understand certain basic concepts, though.

share|improve this answer
3  
Thomas is completely correct. I only want to add that part of the appeal of Scala is that you can reuse the entire honking big standard library of Java. That may or may not be important in your case, but if it is, then previous experience with Java will obviously be very helpful, because you can't help having learnt a lot about the standard library. –  Kilian Foth Nov 21 '11 at 11:56
    
@Kilian I thought about that. I'm still learning Scala and haven't actually done anything meaningful with it yet, but I'm not sure how important it is to know Java to be able to use a Java library in Scala. It's not like you drop into Java syntax/style to call a precompiled JAR from Scala. –  Thomas Owens Nov 21 '11 at 11:58
    
For just about every modern platform it takes a lot longer to learn the standard library than to learn the language syntax. So there is a benefit in knowing Java libraries if you are trying to learn Scala. –  Jeremy Nov 21 '11 at 17:11

Java means two different things:

  1. the Java language - this includes the language, with its syntax, rules, features and overall semantics
  2. the Java platform - this includes the runtime (JVM), the whole standard library and a number of popular frameworks/libraries. Note there are also other Java "runtimes" such as being executed as JavaScript after crosscompilation through GWT, or Java on Android, which is also runs in a different runtime

The Java language and Scala both run on the same platform. AFAIK Scala can call down to Java code quite easily, so if there is any real interest in learning Java to understand/leverage Scala, then it is to understand how this works and how you can best use Java code from within a Scala app. As a language, Java is unlikely to teach you anything C# wouldn't have taught you by now (I assumed from your profile you have some C# experience).

This question's .NET-analogy would be:

Do you need to know C# / VB.NET before trying F#?

In either case, the answer is a pretty firm "No."

share|improve this answer
1  
+1 for differentiating Java and Java platform –  user Feb 21 '12 at 14:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.