Cross-connected neurons - biology and programming langauges

After doing some reading about genetics and taxonomic systems in biology, it struck me how similar principals were at work in programming language design. Specifically, object-oriented languages that include classical inheritance tend to take a phylogenetic approach to structuring software systems. That is, they classify software structures in terms of their inheritance, or "is-a" relationships.

Some languages, however, also include a morphogenetic component in their design. That is, they allow classification of software structures in terms of their "shape" or how they "look". A better way to say this might be to classify objects according to their interfaces, or supported operations. The actual inheritance of an object (or phylogeny) is of less importance than the way it "looks" (or morphology) to users of the object.

Java is an example of a language that supports both phylogenetic and morphogenetic classification, primarily through its use of interfaces that can be used to make an object "look" like a particular type without actually inheriting from a particular parent type. (Admittedly, this analogy isn't perfect, since there is still an "is-a" relationship even when using interfaces. However, with the exception of tag interfaces, the primary use for an interface in Java is to specify the set of operations a class defines.) ECMAScript, however, with its prototype-based design, is fully morphogenetic. The only thing that makes an ECMAScript object classifiable is its set of members. (Here is a nice article on ECMAScript's morphogenetic features.)

Comments:

Post a Comment:
Comments are closed for this entry.
About

toddfast

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today