From: K. G. <kim...@gm...> - 2008-09-15 13:45:34
|
Hi Dean, On Mon, Sep 15, 2008 at 09:37, Dean Michael Berris <mik...@gm...> wrote: > > If you had your own message tag (that's not the same message tag > that's provided in the library) where you specialized the behavior of > the actual message object(s) -- an example of a streaming/asynchronous > message comes to mind -- allows you to either re-use the existing > client implementation (basic_client<your_tag, 1, 0>) or extend the > implementation such that you have tag-specific behavior (use futures, > buffered asynchronous streams, etc.) without compromising existing > usage of default-tagged implementations. Right. so at the moment, most/all associated traits are just typedefs (string_type, etc.), but given a more complex message/client, we could add behaviors associated with the tag as well, without disturbing the existing code. > The bad part about blobs (or traits grouped together) is that it's > hard to extend that design -- you cannot add new traits around tags > and designs without running into the 'too many member' problem. Yup, it makes sense. We can add or change functionality of the class without modifying the class. Sweet. >> 2) directives -- I don't see what benefit these added over member >> functions on the message... Help? > > The directives can also be specialized by tags, so that you can make > it do other things based on the tag. This is also built in with > extensibility in mind. Cool. I think I understand. Thanks, - Kim |