Re:The DCI Architecture: A New Vision of Object-Oriented Pro...
by tbrownaw on Tuesday July 18, 2017 @09:41PM
(#14801535)
The most interesting part is that as good as this sounds I haven't heard of it again since that article first came out.
[ Parent
| on HN ]
Re:The DCI Architecture: A New Vision of Object-Oriented Pro...
by mempko on Tuesday July 18, 2017 @11:52PM
(#14801902)
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.
Re:The DCI Architecture: A New Vision of Object-Oriented Pro...
by fiddlerwoaroof on Wednesday July 19, 2017 @01:55AM
(#14802226)
I 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):
Re:The DCI Architecture: A New Vision of Object-Oriented Pro...
by al2o3cr on Wednesday July 19, 2017 @08:55AM
(#14803907)
Is 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.
Re:The DCI Architecture: A New Vision of Object-Oriented Pro...
by mempko on Friday July 21, 2017 @12:25PM
(#14821756)
Since 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.
Re:The DCI Architecture: A New Vision of Object-Oriented Pro...
by flavio81 on Wednesday July 19, 2017 @12:09PM
(#14805339)
To 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."
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
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?