r/Clojure • u/fadrian314159 • Apr 22 '26
Introducing FOL (Functional Object Lisp)
/r/lisp/comments/1ssex0s/introducing_fol_functional_object_lisp/
14
Upvotes
r/Clojure • u/fadrian314159 • Apr 22 '26
View all comments
Show parent comment
5
u/didibus Apr 23 '26
One nuance in Rich's objection, as I understand it, is that his concerns differ depending on whether objects are used to build programming constructs or to model your application's information.
For things like creating data structures, he thought OOP works well, and that Java was already a decent language for such use-cases. He expected users to implement those in Java and use them from Clojure: "Write Java in Java, consume and extend Java from Clojure." Later he added
deftype, a very limited object system in Clojure specifically so you could implement some of these use-cases without dropping to Java.But for modeling application data, objects are blobs. You can't freely inspect, merge, or serialize them. They bundle identity, state, and a set of operations together. You can't simply map, filter, or reduce over an object's data. And you're dispatching on the blob's name, nominally. A function that only needs x and y can't operate over a blob that has x, y, and z unless you've created a hierarchy of names between them. You're not thinking in terms of the data itself, structurally, but in terms of blobs and their names.