Frege is a Haskell-like purely functional programming language that compiles to Java bytecode and runs on the JVM.
Frege is a purely functional programming language for the JVM that closely resembles Haskell. It compiles to Java bytecode, runs on the Java platform, and allows developers to write stateless, thread-safe code while seamlessly interoperating with existing Java libraries. The language enforces purity through its type system and supports lazy evaluation, infinite data structures, and global type inference.
Java developers seeking to learn and apply functional programming paradigms on the JVM, and Haskell programmers who want to leverage their skills within Java ecosystems or integrate functional solutions into Java projects.
Frege uniquely combines Haskell's expressive power and strong functional guarantees with full JVM compatibility, enabling developers to incrementally adopt functional programming without abandoning the Java platform or its vast library ecosystem.
Frege is a Haskell for the JVM. It brings purely functional programing to the Java platform.
Enforces stateless, side-effect-free functions, ensuring thread safety and enabling compiler optimizations like caching, as highlighted in the Hello World example where pure functions are automatically cacheable.
Compiles to Java bytecode and allows calling any Java library while preserving functional guarantees through type declarations, enabling integration into existing Java projects without sacrificing platform benefits.
Supports lazy evaluation, infinite data structures, and global type inference, allowing concise code such as the Pythagorean triples list comprehension, making complex algorithms more readable.
Features global type inference with explicit purity tracking through IO types, providing robust error checking and safety without verbose annotations, as seen in the type system guarantees for impure functions.
Requires understanding advanced functional concepts like monads and lazy evaluation, which the README admits can be 'incomprehensible' for newcomers, slowing adoption for teams without FP background.
Calling Java from Frege necessitates declaring Java types in rigid Frege terms to maintain purity, adding complexity and potential for errors, as noted in the interoperability section.
Compared to Haskell or mainstream JVM languages, Frege has a smaller native library ecosystem, often relying on ports or Java interop, which can increase development overhead for specialized needs.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.