CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 30

Threaded View

  1. #15
    Join Date
    Dec 2010
    Posts
    77

    Re: policy based design of "modern c++ design"

    I've worked for two very large companies, and in both companies, those who have a good understanding of how to write templates tend to be few and far between.
    Do that means I am learning a powerful design philosophy but can't be used or better don't
    use it in the real case?

    I was finding a way to produce better abstraction codes without any performance degrade, when
    I found GP and TMP, they make me very excited.

    a programmer needs to have a good understanding of both OOP and templates
    Looks like I have some mistakes about policy based design if policy based design is so difficult.
    I am not very good at OOP or template, only know the basic ideas of them and study a few of
    design patterns. Please correct me if I get the wrong idea of it.

    For me, policy based design only try to composite different strategies(could be everything) into
    a body, you don't need to(but could) inherits those policy(or policies)
    you could just composite them(treat them as private data member) to generate
    different types or even apply those policy(s) on function.

    Each of them have their own advantages and weakness, the main idea is extract those "polymorphic"
    actions from the body and make them become orthogonal policy(s) as best as you can.
    The idea is a little bit different than the "is a" relationship of OOP(more like "has a" or "is
    implemented by") when you try to combine those policy(s). It is a small "compiler" which help you
    generate codes same as those handcrafted codes.
    Last edited by stereoMatching; November 18th, 2011 at 01:48 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured