Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: scala vs perl (5 and 6)

by moritz (Cardinal)
on Jun 02, 2013 at 10:16 UTC ( [id://1036571]=note: print w/replies, xml ) Need Help??


in reply to scala vs perl (5 and 6)

I haven't written any Scala code myself, so the following is only hearsay.

Scala is supposed to be a rather nice language, and its features often appeal to Perl programmers. The downsides are usually cited as the following:

  • High startup time due to JVM usage
  • While nice functional features like iterators, map etc. are available, they often make code slower
  • Heavy reliance on Java libraries

The last point needs a bit explaining. On the one hand it's nice to have access to the rich of java libraries. On the other hand, those libraries are designed for java, and the limitations that java has. For example Java doesn't you allow to pass callback functions (because it has no functions, and no references to methods), so whenever you need to pass a callback to a library, you have to implement an interface instead with a method that the library calls for you, which is much more boilerplate. Likewise container libraries written in Java are limited by Java's type erasure.

That said, I would like to encourage you to simply try it out, and see if you like it. Programming languages very much cater to personal preferences, and while some are nearly universally hated (or do you know somebody who does COBOL for fun?), most have their loyal followers who are very productive with their language of choice.

Knowing other programming languages typically also makes you a better Perl programmer.

Replies are listed 'Best First'.
Re^2: scala vs perl (5 and 6)
by Jenda (Abbot) on Jun 02, 2013 at 15:37 UTC

    For an example (albeit on a much smaller scale) of this problem look at C# and the .Net framework. While the language supports generic types and lambdas for quite some time, there's still a helluvalot of APIs designed for the older versions. Whole frameworks with tens of custom collections each one slightly different and neither supporting type inference in enumeration and LINQ, APIs forcing you do implement over-complicated interfaces and wrapper classes where a simple lambda would do, APIs designed so that they in effect turn the whole type system off, because before the introduction of generics there was no other way, ...

    Some of those APIs are deprecated, some of them should be (eg. the whole of ASP.Net Web Forms and the insane mess that's LLBLBLBLBBLLBLLGen), some are still being used, all are painful.

    In either case if you feel like trying Scala, do.

    Jenda
    Enoch was right!
    Enjoy the last years of Rome.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-20 03:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found