Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
The stupid question is the question not asked
 
PerlMonks  

Re: scala vs perl (5 and 6)

by Grimy (Monk)
on Jun 02, 2013 at 15:08 UTC ( #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 (:


Comment on Re: scala vs perl (5 and 6)
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (9)
As of 2014-04-16 06:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (416 votes), past polls