Chapter 80. Think Outside the Java Sandbox

Ian F. Darwin

“Java is the best language ever, for every purpose.” If you believe this, you need to get out more. Sure, Java’s a great language, but it’s not the only good language, nor the best for every purpose. In fact, every so often you should—as a professional developer—take the time to learn and use a new language, either at work or on your own. Go deep enough to recognize how it differs in some fundamental way from what you’re used to and whether it might be useful in your projects. In other words: try it, you might like it. Here are a few languages you may want to learn:

  • JavaScript is the language of the browser. Despite similar names and a dozen or so keywords, JavaScript and Java are very different. JavaScript comes with hundreds of different web frameworks, some of which go beyond the frontend. For example, Node.js lets you run JavaScript server-side, which opens up many new possibilities.

  • Kotlin is a JVM language that, like most of these languages, has a more relaxed syntax than Java, along with other features that can give it an advantage over Java. Google uses Kotlin for much of its work in Android and encourages its use in Android apps. ‛Nuff said!

  • Dart and Flutter: Dart is a compiled scripting language from Google. Originally for web programming, it didn’t blossom until Flutter began using Dart for Android and iOS apps (and browser-side, someday) from one codebase.

  • Python, Ruby, and Perl have been around for decades and remain among the most popular languages. The first two have JVM implementations, Jython and JRuby, though the former isn’t being actively maintained.

  • Scala, Clojure, and Frege (an implementation of Haskell) are JVM functional programming (FP) languages. FP has a long, narrow history, but has been making inroads into the mainstream in recent years. Many FP languages don’t run on the JVM as of this writing, such as Idris and Agda. Learning FP may help you to use the functional facilities in Java 8+, if you’re not really comfortable there.

  • R is an interpreted language for data manipulation. Cloned from Bell Labs’ S for statisticians, R is now popular with data scientists or anyone going “beyond the spreadsheet.” Lots of stats, math, and graphics functions built-ins and add-ons.

  • Rust is a compiled language aimed at systems development with features for concurrency and strong typing.

  • Go (“Golang”) is a compiled language invented at Google by Robert Griesemer, Rob Pike, and Ken Thompson (cocreator of Unix). There are multiple compilers, targeting different operating systems natively and web development by compiling down to JavaScript and WebAssembly.

  • C is ancestral to C++, Objective-C, and, to some extent, Java, C#, and Rust. (C gave these languages the basic syntax of built-in types, method syntax, and curly braces for code blocks and is the language to blame for int i = 077; having the value 63 in Java.) If you didn’t learn assembly language, “C level” is a place to start understanding memory models that will give you an appreciation for Java’s way of doing things.

  • JShell isn’t a language, per se—it’s a different way of doing Java. Instead of having to write out public class Mumble { and public static void main(String[] args) { just to try out an expression or some new API, just forget all the ceremony and boilerplate and use JShell.

So go on. Step outside of Java.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.102.112