Pure Language (Scala)
When I started Scala 5 years back , i thought it was an alien language and the creator must be from another planet, although my background is from various language development. Scala's syntax is so clumsy and difficult to understand in the initial days. It appears to be a BAHUBALI film ("kalakeya" in BAHUBALI). ??
After some experimentation, I discovered that it is one of the best languages for developers and industry, especially those with a Java/OOPs background. It is a fully object-oriented language, which is superior to Java, where every value is an object. There are no primitive data types here like in Java.
The slogan of Scala is "Lesser Line of Code" or "Do More With Less. I was amazed to see that in very few lines of code we could complete our coding. Java/Scala-100/40 lines approx.
Scala stands for "Scalable language" .It is a general-purpose mixed-paradigm language that combines OOPs and functional programming.It runs on the JVM, and the types and behaviour of objects are described by classes and traits. It is a functional language where every function is a value and every value is an object, so ultimately every function is an object.
Other features are: statically typed ,Execute Java Code, Concurrent & Synchronized processing. In my opinion, when dealing with data-bound (PB and ZB) applications, such as those found in most big data projects, Scala is superior to Python.
For the development/IDE part, we have IntelliJ, Vscode, and Zeppeline, of which IntelliJ is the best one. although we can do it through CMD. For building Scala applications, SBT is preferred over Maven. Both have pros and cons, but sbt is more suitable while developing Scala applications. SBT is designed for experiment-driven development (REPL).
a few commands: --------------
sbt console
sbt update
sbt compile
sbt run
sbt package? # making jar bundle # struggled a lot in maven to make jar (plugins).For more about sbt, follow the official documentation.
If you have a bulky project or code base and want to compile it faster, use fsc.
For DB we have, as usual, JDBC as well as Slick.?If you want to see different release improvements, can use Docker. The current version is 2.13.x.
docker run -it --rm hseeberger/scala-sbt:8u222_1.3.5_2.13.1 /bin/bash
docker run -it --rm spikerlabs/scala-sbt:scala-2.12.1-sbt-0.13.12 /bin/bash
docker run -it --rm bigtruedata/scala:2.11.7 /bin/bash
Scala has a good set of frameworks . can opt as per requirements:
Lift Framework
Play framework
领英推荐
Bowler framework
Akka Framework
Spark Framework
Scalding Framework
Neo4j Framework
Lagom MS framework
Guice
Challenges:--------------?
Backward and forward version compatibility is not supported.?
Learning is a little steeper.?
Code understanding is not easy.?
Scala migration from one version to another
Performance wise, it is the best of all surrounding languages. One of the key features is statically typed. This feature has a tremendous role in reducing production defects. industry can save millions of dollars and time. Scala has a provision to prevent "NullPointerException" too. We can use the Option/Some/None pattern. It helps eliminate null values. It has Less Error Prone Code.
There is very risky and cumbersome to write java threads, rather we can use Scala using akka or other framework. The best for parallel and concurrency programming.
Scala might rule the industry in the next few years. I hope for the best. One of the most effective languages that combines OOPs and functional programming.? Scala code is concise and crispy .
Try and learn Scala.
Thanks for reading. For More Information:
Please write me at : [email protected]
Nice read
SRE manager | AWS | GCP | Kubernetes l CKA certified | Docker | DevOps | Agile | NoSQL | AI | LLM | Terraform | Ex-Google Operations Center
2 年Great content Chandrashekhar Kumar