Thursday, September 21, 2017

Julia Actor Network

My next step in the code rewrite is to tear apart everything that I hacked together in the first version. I was very concerned with strict OOP, or Object Oriented Programming. I wanted each virtual object to be self-contained, or hermetic, so I employed a radical slackerism of not separating my class definitions into definitions and implementation... Which resulted in a spaghetti of nesting and recursive definitions. The crisis of readability is that similar functions, such as paint(), are interspersed and spread far from each other.

I said, what about some Actor-Network theory to serve this situation! First of all, it dissolves the boundaries of strict objectivism, allowing the objects to interplay with the network of actions. And it gives these actions, or functions, that share a similar impulse network, to have a first-class file of their own.

So I cut up all the class definitions and glued them together on construction paper, giving like functions a name with underscore: _painting.c. The object definitions are now classically headed, with object names and a focus on inheritance and composition. Now the Classes can focus on their job and Functions can focus on theirs.

I appreciate a pretty directory layout. The most important files, those describing the networks, are listed first. Then the object definitions. Thanks Bruno!

No comments:

Post a Comment