Re: Existence Based Polymorphism

Mat Noguchi <[email protected]>
Newsgroups gmane.games.devel.sweng
Message-ID <D7F4D9E414140644BF099886C28C6636299A84C5F8@bngexchange01.bungie.bng.local>
I was wondering if anyone would start talking about DCI...

To me, DCI is about separating intent and implementation. The naming convention is a little opaque, but methodless roles capture identities as a type (so you can typecheck proper use of parameters!) and methodful roles capture intended behavior. In the bank account example, you have two methodless roles (identifiers as types, basically) of SourceAccount and DestinationAccount, and a methodful role of TransferMoney.

DCI comes in by binding the identifiers and methodful roles to objects through the context object (the C).

So really, the core concept isn't in the names of things but what DCI allows you to see: that an object and the interfaces it can support are separable things, and separating them makes it easier to work with both the interface and the object itself.

MSN

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Bill Kelly
Sent: Wednesday, June 02, 2010 6:33 PM
To: [email protected]
Subject: Re: [Sweng-Gamedev] Existence Based Polymorphism


[DCI stuff snipped]
_______________________________________________
Sweng-Gamedev mailing list
[email protected]
http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.