3 ms·
The Java language is purely functional. “Java programmers” really program not in Java, but in a purely functional language called 'cat'. As with any purely fun
by earenndil 7y ago
The Java language is purely functional.
“Java programmers” really program not in Java, but in a purely functional language called 'cat'. As with any purely functional language, cat consists only of expressions, not statements. Now here’s the clever part: when evaluated (not executed), a cat expression yields a (pure) value of type Java, which is an ADT (abstract data type) that represents imperative programs. That value of type Java is then executed (not evaluated) by the cat language’s RTS (run-time system). As a clever optimization, cat’s RTS actually includes a code generator, considerably improving performance over more naïve implementations of the Java abstract data type.
- deleted 7y ago[deleted]