I am a big fan of Scala aesthetically, and of a lot of the conceptual work put into things like its typing system and libraries.
However, as I have begun tinkering with Scala (and seen some of my coworkers tinker with it) i find myself having to dig for more and more Java knowledge (especially in the way of libraries).
This presents me with a few problems:
At this point though, i'm not sure whether i should bite the bullet and try and find the quickest and most comprehensive tour through Java to catch myself up on 20 years of Java developments, or whether its reasonable to continue trying to incrementally patch my knowledge as i wander around scala.
Any wisdom that scala heads amongst us could offer would be greatly appreciated.
P.S. I have no doubt in my ability to familiarize myself with Scala syntax, and i'm perfectly comfortable and happy with functional programming and the paradigms in the scala community. But a programmer's competence is not just based on one's ability to teach oneself, but also one's ability to learn from, and adopt tools and skills from other people.
Scala runs on the Java Virtual Machine (JVM) and can interoperate nicely with Java code. This also means Scala developers can use Java libraries directly from Scala code. Given, many Java developers are turning to Scala; this is the perfect way of leveraging their years of experience in real-world Java programming.
Hello, You can learn Scala without knowing Java. examples. Java standard library.
Scala runs on the Java platform (Java virtual machine) and is compatible with existing Java programs.
Scala is a type-safe JVM (Java Virtual Machine) language launched by Martin Odersky in 2003. It combines both object-oriented and functional programming paradigms into a concise and logical high-level language. Scala is sometimes viewed as an attempt to create a better version of Java, and rightly so.
You should take a lazy
approach to learning Java. Learn it when you need it.
In my opinion, much of the old Java knowledge is out of date, much of the new tutorials are redundant. You certainly don't want to bother yourself with Java's antiquated Collections
, for example. Many Java-based frameworks can be safely ignored. And the heavyweight JavaEE stack can be safely bypassed until you were forced to use a part of it.
Many common patterns in Java are much simpler in Scala, with the former being burdened with much boilerplate code. Core logic should always be implemented in Scala. I believe you can do most of your work directly in Scala and only need to dip down into Java when building things like Swing or integrating with Spring, etc.
In regard to choosing and using Java libraries, my personal guidelines are:
That's a bit tounge-in-cheek, but is the impression I get about the maturity and stability of third party libraries after having done Java for the last 12 years.
If you want to learn Spanish, start to learning Spanish, not Latin. Same for programming languages. There are two things from Java that are good to know:
The first thing are APIs. But you need only a general overview about what exists. Even long time Java programmers don't know all the details. And finding the right API or lib for a problem is usually easy, as Java is so common, and even with weak Google Fu you shouldn't have any problems.
The second thing you need to know are some basic principles and limitations of Java and the JVM (including how to build and run), that help you to understand some of Scala's problems and design decisions. One typical example would be "type erasure": If you don't understand this limitation of Java's generics, you'll run in problems when using generics in Scala.
As you can see, the things you really need to know is limited. Everything else can be picked up on the way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With