Frege: purely functional programming for the JVM
summary
Frege is a Haskell-for-JVM that compiles Haskell to Java source (then javac to bytecode), enforces purity across Java calls by requiring Frege types for Java methods, and marks side effects as IO types for side effects so impure calls percolate up the call chain. Examples include partial application, function composition, memoizable pure math calls, a FizzBuzz built from infinite streams and zip, and a transactional counter checked by the compiler. The language uses global type inference to reject side effects in parallel/STM code and eliminate nulls and NPEs.
AI-written summary · about
chapters (12)
- 0:00Start
- 6:46Operational Reasoning
- 7:18Using functions
- 12:36Define a Function
- 16:58Reference a Function
- 21:01Function Composition
- 24:58Pure Functions
- 34:08Java Interoperability
- 35:14Frege - Java
- 48:29Fizzbuzz Logical
- 48:46Fizzbuzz Comparison
- 51:43Unique in Frege
related talks
01h 00mFrege: Purely Functional Programming for the JVM
51mFunctional Programming with Java
46mDesigning Functional Programs
36mHow functional programming change my Java code
52mFunctional Programming with Java 8
01h 06mThe Joy of Functional Programming
34mPrinciples of functional programming with examples in Java and Haskell
49mRelax, It's Just FP
