Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Isolating side effects #4
It should not be possible to create side effects everywhere in the program. In particular, the functions representing the methods of an object should not create side effects. The idea is to have a second type of object for that. The names of those objects should be surrounded by
The rules are:
The Schlawiner also has attributes in the same way an objects has. But its attributes dictionary is an atom. It can reassign its attributes with the
@moonglum I really like the idea of enforcing stars around objects with side-effects. I'm wondering if the rule to let only Schlawiners send messages to other Schlawiners is too restrictive. An alternative might be to let only Schlawiners create other Schlawiners. So you can pass a Schlawiner to a non-Schlawiner via Dependency Injection.
In Halunke, there would be no "Text" Interface, but the Objects could be implemented similarly.
Text t = new UpperCaseText(
The Idea of building up an object graph like this is explained in more detail here: