Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: scala vs perl (5 and 6)

by Grimy (Pilgrim)
on Jun 02, 2013 at 15:08 UTC ( [id://1036591]=note: print w/replies, xml ) Need Help??


in reply to scala vs perl (5 and 6)

Hi,

I'm a huge fan of both Perl5 and Scala. They are both strong language that fill different niches. In my opinion—and I know many won't agree—, when building complex class hierarchies, static typing is a must have. Thus I only use Perl for simple tasks: command-line one-shots, file manipulation, an audio player… and keep Scala for more complex things.

Scala is basically Java on steroids.
  • Since both compile to the same .class, they are entirely interoperable (Java code calling Scala functions sometimes requires boilerplate, but the other way round is trivial). This is a huge advantage, considering the vast amount of Java library available.
  • Scala's syntax is great and flexible. You can define your own operators; define objects that can be called as functions (this is a common pattern in Scala, even array accesses are written array(index)); use OO, functional, procedural or mix everything… Yup, in Scala too, TMTOWTDI.
  • There is no performance hit for using Scala rather than Java. On the contrary, using functional idioms is usually faster in Scala, because they are specifically optimized (e.g. tail recursion).
  • The only thing I don't like about Scala are the compilation times. It's getting better, but they where really silly (about 10s for 1000 lines on my machine).
I hope this was helpful (:

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1036591]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2024-04-25 12:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found