Sunday, July 8, 2012


What do you mean by primitive?


     The term primitive is, I hate to admit, one of those self-aggrandizing academic terms. However, it's use is justified. There aren't many other words in computer science that have the intuitive connotations and verbal flexibility of the word primitive. After all, a primitive can be both a noun and an adjective. It summons imagery of a rag-bedecked cave man throwing a rock at a passing antelope. This is useful imagery!

     A primitive is just a basic building block. It's a completely relative term. It also helps you understand that computer programs are layered like an onion. If you are looking at the outer most layer of an onion which sits in a pile of other onions about to be sweated into a French Onion Soup, that particular onion looks like one irreducible building block of the soup. But, of course, an onion has a bewildering amount of layers beneath the one you are looking at.

     Computer languages are written in other computer languages, which themselves are written in other computer languages, which themselves are eventually written in binary code, which itself is an arbitrary (processor-specific) language that is composed of things like op-amps, memory and counter ICs which are themselves arbitrary arrangements of transistors. Transistors are strange little devices that take advantage of the strange behavior of elements like silicon, germanium, and phosphor to produce a simply massive amount of effects which are so confusing that most programmers have simple no idea how they work. Hell, even if you understand how one type of transistor works pretty well, there are literally thousands more that work in completely different ways! Is this starting to sound familiar in any way?

     This is actually a lot like one of Mandelbrot's fractals. That is, you see this layered construction, wherein each layer does the same sort of thing as the one above it, but in increasingly complex modalities which themselves get harder and harder to understand. This is the genesis behind my idea of a Fractal Programming Language: If these layer's are unavoidable, why not give them one coherent topology and syntax which covers all the necessary primitives needed to build programs of any level of complexity. Then, each layer of programming consists of the same set of core primitives, with new functions created (out of the layers below) to deal with ever-increasing levels of abstraction?

     OK, now that your brain is spinning, back to primitives. Just think of primitives as basic ingredients with which you can 'cook' up new recipes.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.