Ontology, Desire, and Object Calculus | Desire-Oriented Programming - Gregory Bringman

Ontology, Desire, and Object Calculus | Desire OP (initial treatment)

This is a "code critique" posted in the 2010 Critical Code Studies Working Group, on human/non-human desire in programming. See also my initial treatment of Desire Oriented Programming

### Code:

```(* Natural Numbers *)

(*
* First encoding. Try evaluating zero'.succ, zero'.succ.pred, etc.
*)

zero' = [iszero = true,
pred = @(x)x,
succ = @(x)(x.iszero := false).pred := x];

(*
* Second encoding. Try evaluating iszero(zero), iszero(one).
*)

zero = [case = \(z)\(s)z,
succ = @(x) x.case := \(z)\(s)s(x)];
one = zero.succ;
two = one.succ;
iszero = \(n)n.case(true)(\(p)false);
pred = \(n)n.case(zero)(\(p)p);

------------------------------
```

### Critique:

Software ontologies and object-oriented programming focus on taxonomies and "objects" to structure software, but what if a motivation of such a focus was to construct a virtual field of desire rather than simply to build a robust expert system or business logic? Programs show not only mappings of mind to code, but also human and non-human desire.

For instance, inheritance and composition rules evoke desire through two highly abstract ontological roles linked to desire proper: two predicates, A is a B, and D has a Q are in turn tied to identity and possession.

Sigmund Freud's notions of identification and cathexis correspond to these rules of inheritance and composition. Objects carry investment, and desire is expressed by object-building. Simulacra are built and verisimilitude is championed, we are either self or other and live within the constraints of a grand taxonomy, right?

The code above comes from an implementation of the sigma or object calculus by Santiago M. Pericas-Geertsen, in which the lambda calculus is folded into its syntax.

Much of this sigma calculus "translates" programs written in functions to those written in objects. Given the prioricity of functional languages to object-oriented languages, one needs to ask, why build objects from functional code? While objects have a larger application in their use under the general umbrella of language, a language placing marks on the thunderstorm and the dirt mound and encapsulating the unruly in a name, why must we "tame" that which we model, why must we build a taxonomy as a model? Or does object building build societies by adorning the stuff of the world with social, economic, cultural and gendered capital?

The implementation below is written in Standard ML "of New Jersey", SMLNJ. It interprets .sigma files, an example of which I include here. In a .sigma file, the sigma operator (@) marks the beginning of an object. It is analogous to the lambda operator, written here as \. To read a sigma operation, for instance, @(x)x means 'the object with self x returns the value x', (it is an identity operation). A more complex statement might expand on this first statement - as the above code does, attempting to construct natural numbers in terms of predecessors and successors, i.e., @(x)(x.iszero := false).pred := x, the object with self evaluates its 'iszero' member against false to qualify as a successor and once evaluated has a predecessor ('pred') equal to the 'x' of the first statement.

```zero' = [iszero = true,
pred = @(x)x,
succ = @(x)(x.iszero := false).pred := x];
```

A rewriting of "zero'" shown under the comment "Second encoding..." (in the full code above) contains the aforementioned functional operations: it defines 'case', which evaluates to a function taking two arguments. If the first argument evaluates to 0, then the function returns that argument, otherwise it returns the second argument in yet another function f(). This formalism seems to subtly make a distinction between functions and members, and the key difference between lambda and sigma notations here seems to be the use of the dot syntax for representing an object, i.e. once case is defined in terms of a lambda function, then take the object with the 'case' variable and de-reference, i.e. x.case... Then build an entire sequence of object-numbers, i.e. one = zero.succ, two = one.succ

```zero = [case = \(z)\(s)z,
succ = @(x) x.case := \(z)\(s)s(x)]; one = zero.succ;
two = one.succ;
```

If object-oriented code has a functional basis, can we redeem such code in its "object" sense through the notion of desire, given the modern critique of the object philosophy of Aristotle as well? In the investment shown by the programmer towards source code "with members", is non-human desire created as programmer- humans act as an extra layer of Nature writing Culture onto machines?