Paul Krill
Editor at Large

New JVM language stands apart from Scala, Clojure

news
Jan 13, 20172 mins

Immutable by default, Eta can reuse Java libraries and features strong type safety

Java sign
Credit: Amber Avalona

Another JVM language, Haskell dialect Eta, has arrived on the scene, again centering on functional programming.

Intended for building scalable systems, Eta is a strongly typed functional language. It’s similar to Scala, a JVM language that also emphasizes functional programming and scalability, and Clojure, another a functional language on the JVM.

But Eta sets itself apart from such competitors because it’s immutable by default, it uses lazy evaluation, and it has a very powerful type system, said Eta founder Rahul Muttineni, CTO at TypeLead, which oversees the language. This combination allows static guarantees and conciseness simply not possible in Scala or Clojure.

Currently at version 0.0.5 in an alpha release, Eta is interoperable with Java, allowing reuse of Java libraries in Eta projects and use of Eta modules in Java. Strong type safety enables developers to tell the compiler more information about code, while immutability in Eta boosts concurrency.

Eta also features purity, in which calling a function with the same arguments yields the same results each time; function definitions are treated as equations and substitutions can be performed like in math. Eta proponents said this makes it easier to understand code and prevents a lot of bugs typical in imperative languages. “Purity allows you to treat your code like equations in mathematics and makes it a lot easier to reason about your code, especially in concurrency and parallelism settings,” Muttineni said.

Eta is “lazy by default,” meaning data stays in an unevaluated state until a function needs to see inside. This lets developers program without having to be concerned about whether they have done more computation than was required. Developers also can write multipass algorithms in a single pass. “Laziness allows you to stop worrying about the order in which you write your statements,” said Muttineni. “Just specify the data dependencies by defining expressions and their relationships to each other, and the compiler will execute them in the right order and only if the expressions are needed.”

Plans call for fitting Eta with a concurrent runtime, an interactive REPL, metaprogramming, massive parallelism, and transactional concurrency. Support for the Maven build manager and a core library are in development as well, along with boilerplate generation for Java Foreign Function Interface imports.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author