DCI in Go?

138 views
Skip to first unread message

stephanos

unread,
Feb 15, 2014, 9:36:50 AM2/15/14
to object-co...@googlegroups.com
Hi there,

I just came across this interesting concept of DCI and my head is spinning. 

I'm wondering: Can it be applied to Go (my current go to - no pun intended - language)? 
And if not: could a Go program still benefit from the concepts of DCI?

Cheers
Stephan

Egon Elbre

unread,
Feb 16, 2014, 8:11:55 AM2/16/14
to object-co...@googlegroups.com


On Saturday, February 15, 2014 4:36:50 PM UTC+2, stephanos wrote:
Hi there,

I just came across this interesting concept of DCI and my head is spinning. 

I'm wondering: Can it be applied to Go (my current go to - no pun intended - language)? 

Not directly, i.e. it would require some preprocessor to properly support DCI.
 
And if not: could a Go program still benefit from the concepts of DCI?

Yes... DCI concepts can be applied in any languages... similarly how you can still apply OOP concepts when writing assembly. In other words, yes you can, but it could be less readable and have an overhead in the programmers head.

You describe the role interface for the context struct... and instead of declaring role methods you would declare them for the context instead.

... and just to clarify... that isn't DCI...

Of course there is another question, whether it will fit the program you are writing...

+ egon


Cheers
Stephan

stephanos

unread,
Feb 16, 2014, 9:30:40 AM2/16/14
to object-co...@googlegroups.com
Thank you so much! 

I'll play around with the concept a bit more and read "Lean Architecture" ...
Reply all
Reply to author
Forward
0 new messages