Frege joins Scala, Clojure among Java functional languages

The strictly typed, purely functional language is 'a Haskell for the JVM'

programming code monitor

Frege, a functional language on the JVM, wants to give Scala a run for its money and entice developers.

Spotlighted during a session at the JavaOne conference in San Francisco this week, Frege is pure functional programming language with a strong static type system and type interface. Named for German mathematician Gottlob Frege, the language enables the use of Java classes and methods.

"Frege is a Haskell for the JVM," said Dierk Konig, a committer on the project and a fellow at software development and consulting firm Canoo. The language makes the Haskell "spirit" accessible to the Java programmer, producing a new level of safety, according to Konig, who gave the Frege presentation.

Haskell has been billed as a pure functional language, hiding low-level details and letting programmers focus on results rather than devising steps.

Frege serves as another functional language option on the JVM alongside Scala, Clojure, and now Java itself, thanks to Java 8's adoption of lambda capabilities earlier this year. In an email, Frege founder Ingo Wechsung said he sees a niche for Frege to fill in the JVM ecosystem. "In the functional realm, Scala has for sure a top position. It has the most complex type system of all languages I know -- not just JVM," he said.

"Clojure, on the other hand, is appealing for Lisp fans. Groovy somehow manages to close the gap between dynamic and functional languages. But the niche of a strongly typed, purely functional, and non-strict languages was vacant up to now. This where I see Frege."

The language is general purpose. "Anything you could do with Java, you could also do with Frege," said Wechsung, a senior IT consultant in Germany. He first went public with the language, which is now at version 3.21.500, in 2011.

Currently, Frege consists of a compiler, an Eclipse plug-in, a REPL (Read Evaluate Print Loop), and basic Maven support. Wechsung acknowledged such pain points as a need for better tooling, documentation, and integration with Java 8 functional futures, and he noted that "anyone is welcome to contribute to that what he thinks is missing."

Copyright © 2014 IDG Communications, Inc.

How to choose a low-code development platform