forked from acutelanguage/acute
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit introduces an incompatibility in the object model. Before this commit, traits were stored in a list and a really inefficient algorithm was used for finding conflicts and dispatching on objects. Further examination noted that since no conflicts can exist at any point in the composite objects slot table without explicit resolution (i.e., pick a different name for one of the items), then it is actually unnecessary to keep a list of items. Rather, we can add the items to our objects slot table. This does hinder removal of a trait once a composite object is built, but I believe this to be a minor issue. Presently we add trait Block objects *ONLY* to the slot table of the composite object. Should you care to transfer other types of state (i.e., a non-Block type) then you must do so manually. I would strongly advise not doing that however. Traits should be independent of state, and only carry behaviour.
- Loading branch information
1 parent
e2d4e4f
commit 9ffcb05
Showing
2 changed files
with
15 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters