It is my opinion that every language was created for a specific purpose. What was Scala created for and what problems does it best solve?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
One of the things mentioned in talks by Martin Odersky on Scala is it being a language which scales well to tackle various problems. He wasn’t talking about scaling in the sense of performance but in the sense that the language itself can seem to be expanded via libraries. So that:
Looks like there is some special syntactic sugar for dealing with
j.u.clocks. But this is not the case, it’s just using the scala language in such a way as it appears to be. The code is more readable, isn’t it?In particular the various parsing rules of the scala language make it very easy to create libraries which look like a domain-specific language (or DSL). Look at scala-test for example:
(There are lots more examples of this – I found out this one yesterday). There is much talk about which new features are going in the Java language in JDK7 (project coin). Many of these features are special syntactic sugar to deal with some specific issue. Scala has been designed with some simple rules that mean new keywords for every little annoyance are not needed.