5 ms·
The problem with DCI is that it didn't have native support in any programming language. Coplien, one of the co-founders of DCI is actually working on a programm
by mempko 9y ago
The problem with DCI is that it didn't have native support in any programming language. Coplien, one of the co-founders of DCI is actually working on a programming language called Trygve which implements these ideas.
https://github.com/jcoplien/trygve https://github.com/jcoplien/trygve
- fermigier 9y agoThere are a few language-specific libraries, including, for Python: https://github.com/amolenaar/roles https://github.com/amolenaar/roles
- nerdponx 9y agoI'm not sure I understand the example in https://github.com/amolenaar/roles/blob/master/example.py 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?
- aryehof 9y agoTrygve development has been effectively abandoned.
- jcoplien 9y agoOn whose authority? As of this week there is a new debugger interface.
- fiddlerwoaroof 9y agoI only skimmed the article, but it the description sounds a bit like some of the ideas in ContextL, an extension of CLOS (Common Lisp's Object System): https://github.com/pcostanza/contextl https://github.com/pcostanza/contextl http://www.jot.fm/issues/issue_2008_03/article4/ http://www.jot.fm/issues/issue_2008_03/article4/
- al2o3cr 9y agoIs that still being developed? Has some recent commits, but parts of the manual are clearly somewhat out-of-date; for instance, in 5.3.1 (Defining Generics) there's a "try doing that in Java!" that's trivially accomplishable with Java generics.
- mempko 9y agoSince when can you create new objects of a generic type T in java using "new"? class MyGeneric<GenericType> { public GenericType stupidJava() { return new GenericType(); } } You still can't do that with java. In order to create a new instance from a generic type you must use the reflection mechanism. Or alternatively do what Java people did for ages, factory classes. Trygve allows you to use "new" keyword. So no, the manual is correct.
- flavio81 9y agoTo be honest, the ideas on the article look that they can be implemented in a straight way using Lisp's CLOS. EDIT: The post below beat me to it, it was already implemented in CLOS... "ContextL is a CLOS extension for Context-oriented Programming (COP), and was the first language extension that explicitly supports COP when it was originally introduced in 2005." https://github.com/pcostanza/contextl https://github.com/pcostanza/contextl