aspose file tools*
The moose likes Scala and the fly likes what is scala ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Scala
Bookmark "what is scala ?" Watch "what is scala ?" New topic
Author

what is scala ?

sasank manohar
Ranch Hand

Joined: Feb 14, 2008
Posts: 186
hi,

there are a lot of discussions going on here, whcih i could see. all i want ot know is what is scala, can i have small intro' for that?


"SCJP5 | SCWCD5| DEVELOPER"
Venkat Subramaniam
Author
Ranch Hand

Joined: Jan 28, 2008
Posts: 79
Hi Sasank, sure here is a short intro.

Scala
is a hybrid functional programming language
supports pure OO paradigm
is statically typed (more than Java) but uses quite a bit of type inference
is very concise
is highly expressive
has nice features to develop highly concurrent code
runs on the JVM
integrates nicely with Java
compiles into bytecode
you can write small scripts or an entire application with it
Trilochan Bharadwaj
Ranch Hand

Joined: Feb 02, 2009
Posts: 100
Venkat,

I only briefly played with Scala, So can't really say much, but I have heard that Scala's notation is a bit complicated and turns you off a bit; Is that true?

My point is, how much of a different language is it from java (Leaving aside, closures and Functional programming paradigm, I understand that part and I get that this is a big advantage), But my question is more geared towards:
1.) If I start using Lift framework (built on Scala), would I be able to learn Scala? (Been doing Java @ work for years now, played around with Ruby and a bit of Haskell and some Erlang).
2.) How different is Actor Model of Scala from Erlang?
3.) OK, Big one; How do I get started? I keep reading those quick start manuals, but I need to get something running under my belt to say .. "OK, that's it! I am off to Scala".

Personally, From the featuresets I have read about, Scala seems to be language of the future, hell even James Gosling said so.

Suggestions / Pointers?

Trilochan.
Venkat Subramaniam
Author
Ranch Hand

Joined: Jan 28, 2008
Posts: 79
Hi Trilochan, in the introduction chapter in Programming Scala I wrote:

"The operators and constructs of Scala can be quite intimidating2 to a beginner.
The syntax is not going to be easy for the faint of heart certainly. As
you get proficient with Scala, though, you will begin to appreciate the
conciseness and learn to avoid the terseness so the code is easier to
maintain and understandable at the same time."

Footnote 2: "I’ve never learned a language whose syntax did not hurt my head when I started out
with it—Ruby included. Practice, and the syntax becomes natural fairly soon."

How different is the syntax. You will find that the syntax is less ceremonial and more concise in general.
There are a few differences you have to learn. However, that is just the nature, they are different and
we generally find it odd when we see things we're not used to. But, once you understand these differences
and start programming, you will get by quite comfortably, especially if you know Java fairly well, but
are willing to work with other languages.

In response to 1), if you start with a Java web framework, would you be able to learn Java? If you start with Rails
would be able to learn Ruby? If the answer to these questions are yes to you, then I would say yes. They are no to me
and so, I did not try to learn Scala by using Lift. I would have to know some Scala to use Lift.

2) They are very similar.

3) Each of us learn differently. I learn by writing a lot of code. I would read may be for an hour and spend hours
tweaking the code, breaking it, and making it work. Others learn differently. So it depends on how you generally learn.
The good news is there are some books in the market now if you want to go that route. I wrote Programming Scala
so that busy Java programmers can start using it very quickly without having to spend a lot of time reading a lot of
material. I have distilled the content in the book to the essential things you need to know in Scala and of Scala to be
productive with it.
sasank manohar
Ranch Hand

Joined: Feb 14, 2008
Posts: 186
Trilochan Bharadwaj wrote:

Personally, From the featuresets I have read about, Scala seems to be language of the future, hell even James Gosling said so.



well, does this mean scala is going to be on top of the world and java sits back ?venkat, trilochan?
Venkat Subramaniam
Author
Ranch Hand

Joined: Jan 28, 2008
Posts: 79
Hi Sasank, our field is way too young to have right now one language that will dominate the future.
We have a lot more ahead of us to make mistakes, to learn from them, and to figure things out.
In my opinion, the future is in being open minded, willing to make those mistakes, and learn quickly.
sasank manohar
Ranch Hand

Joined: Feb 14, 2008
Posts: 186
In my opinion, the future is in being open minded, willing to make those mistakes, and learn quickly.


hi venkat,
i agree with you.certainly future is theirs who learn from mistakes, in prgramming as well as in life. thank you for your valuable inputs.
Trilochan Bharadwaj
Ranch Hand

Joined: Feb 02, 2009
Posts: 100
Well personally speaking, there are things that certain languages can do better in certain applicable areas and in certain areas they are not as effective, for example dynamically typed languages like Ruby have their domain, Statically typed languages like Haskell, Scala have their own domain, there's no "one" formula-language of the future for commercial applications, the more I perceive the environment, the more I think it is going to be scattered, everyone using the languages and tools for their customized project requirements; Personally after doing Java for years, when I was exposed to Haskell and ML, I was like, wow why don't we have such things in Java ...

Presumably, there are things going on in Java that could make it happen, if functions are made first class citizens in Java, closures are added the whole picture could change ... Then all they would have to do is, ask Doug Lea and co to sit down and revamp concurrency package to embrace actor model more or less ... It could happen; But I doubt if that'd change anything from consumer developer's perspective, I keep hearing that Generics has complicated matters in java, I don't buy it personally (there are those who disagree with addition of closures and other features because of more complications being added to Java).

Because of reluctant java folks who are a little too cautious about adding features by being "bakwards compatible" I'd say its highly likely that some of the languages will grow really well and sooner or later developers will take a hard look and make decisions; I mean hell, C# and the whole .NET platform has been so good in that respect, that Java folks are now beginning to recognize the fact that they need to improve. We can rant about which language will win, Haskell fanatics like me would like to see Haskell do really well, but we don't know yet.

Bottom line for me is that Imma learn Scala whether it grows or not, for me driver is not being marketable but just gaining knowledge of different languages, because it allows me to learn of different approaches to solve same problem; the options available should always be explored to solve something ... New language allows me to do just that.

BTW, Venkat, I got me your book, prolly gonna start during this week, should I have any questions, I'll post it here ... thanks!

Trilochan.
 
wood burning stoves
 
subject: what is scala ?