I understand a CAF is a form in a sense of it being of specific shape in memory, or one of infinitely many possible graphic representations of some value it can be evaluated to. (It is noted that "constant applicative form" is synonymous to "static thunk".)
I understand it being constant in that there are no free variables and all the information necessary to evaluate a Constant Form is already contained therein. It's a shape that has no arrows pointing outwards.
But why "applicative"? I can't sleep at night due to this. Everyone says caf, caf, but who actually knows what that literally means? Does it have something to do with applicative functors (I guess not)? What other kinds of applicative forms does one get out there?
A term in constant applicative form is a constant applied to (zero or more) other constants. (Of course each of those constants may require quite some computation before they're fully evaluated!)
Every CAF is a supercombinator, and supercombinators are, long story short, functions that take other (possibly nullary) functions and apply them to one another.
So, my understanding of "applicative" in the CAF name is as referring to their supercombinatorish nature.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With