UP | HOME

Abstraction Barriers

An atom is an ultimate abstraction barrier. It appears to be indivisible, basic and “solid”.

An atom while appeared (to Life Itself) to be a “thing” is actually a process. Everything is a sub-process of one single unfolding process we call Universe - waves on a single body of “water”.

So, an atom is an ultimate abstraction barrier, but not very interesting one - it is a complete “black box”.

More interesting abstraction barrier is a cell membrane. The purpose and meaning of a membrane is to isolate a particular process (actually - a whole set of proceses) from the rest of the Universe. And yes, this is how nesting of processes is done. This, by the way, is a definition of what fundamental and universal means.

The point is, however, is that a cell membrane is not “total” or complete. It is penetrable in both directions - it has “gates” and “pumps” and what not so parcicular molecules and ions can be taken in or pumped out.

The set of gates and pumps is not random or arbitrary, it has been evolved to serve a particular purpose of a specialized cell. (While started equivalent, each cell become “specialized” - transforms itsel into one of some particular kind).

And this is when the concept of an “interface” comes from. It is that fundamental. Interface is not what you see on an iPhone. An interface is the means of interraction between processes. This is the right understanding.

So, you see, a lambda has the simplest interface - one value in, one value out. Values are assumed to be type-tagged, which corresponds to having a unique atomic structure of a particualar molecule/, so no extra information is required.

This is why The Lambda Calculus are so fundamental - lambda is an ultimate building block - a generalization, a universal enzyme, which is a machine made out of proteins.

In molecular biology each enzyme is an evolved (by trial and error) specialized machine for a particular transformation. Mother Nature does not generalize.

By currying of lambdas we would have what appears to be a multi-argument functions. So, suddenly we have a much complex interfaces - the notion of an order of arguments is suddenly there. And of a number of arguments.

Mother Nature has no notion of a Number - it does not count, so there are no “multiple arguments enzymes” in Molecular Biology. Each “input” is a self-contained molecule with a particular strucure, and if more that one is required there is more than one “gate”.

There is one step further. Since Mother Nature does not conut it has no notion of Time. Whatsoever. It has, however, notions of a “phase” or “state” of a circular (actually - spiral) process. What they call “biological clocks” are just sensors, not counter.

Now, a module is a set of exported function signatures.

A function is just a named lambda, either curried (nested) or not. Yes, currying is just nesting in the context of application. Thus a curried function can be partially applied.

A signature is a name (for a reference) together with information of a number and particular ordering of the arguments. If we are not in a type-tagged universe, then type information for each parameter (argument) is also provided. For now a type is just a named set of values.

Now, you see, an abstraction barriers are literally everywhere and at different levels, just like in biology. A lambda can be viewed just a single enzyme, while a module is a single cell, whose exported interface (a set of singatures) is its “membrane”.

Just as in biology, everything should be stateless and immutable. Same input - same output. Always. (eveyry enzime is like this). And this fundamental principle is not something which came from abstract mathematics. Mathematics generalized this principle from the fundamental laws of the Biolofy. For life to be possible the causality has to be stable or appearantly immutable.

Anyway, the notion of an abstraction barrier or of an Abstract Data Type, which is a named, formally specified set of interfaces, is the most fundamental in programming too. We have them at a function level and at module level. Therefore the notion of modularity and of lose coupling (and of sharing nothing) is the most fundamental one.

Proper (non-leaky) abstraction barriers (proper ADTs in their own small, specialized modules) enforce modularity and therefore hierarchical, layered design, possibility of swapping of implementations, hot code reload, easy maintainabiliy and all the nice things.

In the ML family of languages one should use Algebraic Data Type where, ideally, each type corresponds to a distinct concept in a problem’s domain and has its own module, which exports its abstract interfaces. This is how beautiful things like Coq has been written - just the standard library and a bunch of Algebraic Types.

All you have to do is to be pure functional and use small, specialized modules (which leverage a standard library of a decent, well-researched language such a s Haskell or Ocaml). And yes, it is that simple once you have the right understanding of whys.

Author: Ln Gnmn <lngnmn2@yahoo.com>

Email: lngnmn2@yahoo.com

Created: 2023-08-08 Tue 18:39

Emacs 29.1.50 (Org mode 9.7-pre)