It even mentioned Nix! Yay!
Any ideas what they are trying to say here:
āWhat blew my mind was that you couldnāt do traditional data structures in functional programming,ā Williams says. āI didnāt have to make an object for a tree, I could just do it. It feels like it shouldnāt work, but it does.ā
?
Pretty sure heās saying that referential transparency makes certain datastructures quite trivial, requiring basically no scaffolding code to make them function, while at the same time, it effectively disallows other datastructures.
ācouldnāt do traditional data structures in functional programmingā sounds a bit like itās alluding to the fact that data structures which work well in ātraditionalā programming donāt work too well in functional programming (hence Chris Okasakiās PhD, what Rich Hickey did in clojure, etc.) ā¦ but I donāt think that is what is meant.
āI didnāt have to make an object for a treeā ā¦ hmm ā¦
-
Either sheās going all lambda-the-ultimate (Steele and Sussman, not the blog) on us, and implementing data structures with lambdas and nothing else, but I doubt that very much.
-
Or sheās making trees with some built-in list type (basically cons cells). So sheās made a tree without creating a new type ā¦ no new type ā¦ no new class ā¦ no object?
-
Or maybe she has something along the lines of
data Tree a = Nil | Node a (Tree a) (Tree a)
(or its equivalent in whatever language), so she does have a new type, but because the data are not fully encapsulated inside the āobjectā (descend down a branch and the identity changes) so itās not sufficiently objecty? -
Or maybe sheās confused by the lack of dots. Quite some time ago I came to the conclusion that all too many people believe that OOP is about syntax, specifically the dot in the
receiver.message(...)
syntax in languages such as Java, C++, Python, etc. Consequently they would claim that there are no objects in Smalltalk or CLOS, because there are no dots all over the place saying āthe thing just in front of me is an objectā.This observation gives me the opportunity to bring this slightly back on-topic, that is to say, Nix: too many people are confused by Nixā syntax not using parentheses for function calls, because the link between the platonic concept of a function and the parentheses syntax is just too strong.