Re:The DCI Architecture: A New Vision of Object-Oriented Pro...
by fermigier on Wednesday July 19, 2017 @12:51AM
(#14802050)
There are a few language-specific libraries, including, for Python: https://github.com/amolenaar/roles
[ Parent
| on HN ]
Re:The DCI Architecture: A New Vision of Object-Oriented Pro...
by nerdponx on Wednesday July 19, 2017 @09:56AM
(#14804275)
I'm not sure I understand the example in https://github.com/amolenaar/roles/blob/master/example.py. Maybe it's just too simple to demonstrate the benefits and so the code seems a little contrived. But why have the `context` thing at all? Why can't TransferMoney just handle the money transfer logic itself, without adding a whole extra layer of indirection with the `context` and then the MoneySource and MoneySink?