joschabach/micropsi2 — pull request #49 by spalanzani (2014-11-17 17:30:04+00:00)
Title: Redundancy Hunt: Moving state to instance variables consistently

So far, for all nodenet objects, state was stored in dicts and instance variables, sometimes redundantly. Outside code was relying on access to these dicts, which made swapping out our classes for alternative implementations (i.e. proxy classes for matrix-based runtimes or StrongCore) impossible.

With these changes, all runtime classes (inside /nodenet) access each other's data through instance variables. To the outside, they communicate the same dicts they used to expose, through the "data" property, which now transiently calculates the dict to be used for persistency and data transfer.
Proxy classes can now implement the data property from their respective data layer without the rest of the code making assumptions about the data layer being a dict.