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

Threaded View

  1. #27
    Join Date
    May 2009
    Posts
    2,413

    Re: Is STL important?

    Quote Originally Posted by ltcmelo View Post
    I don't see this as a competition forum where one is trying to break the other's argument. I see codeguru as a great place to learn and exchange ideas and experiences.
    So do I but I also know what buttons to push to engage people, and it worked!

    So you think no one sees OO in the STL but the STL can be used to learn OO together with GP. Confusing, no?
    It may sound like a contradiction but it isn't. STL definately is no step-by-step instruction showing how to combine OO and GP but it's a very good example of what pure GP looks like in practice. And knowing what GP is all about is an important first step in combining it with OO.

    You also say that static and dynamic polymorphism are terms not traditionally used.
    These terms are, contrary to what you think, traditionally not used as alternatives for GP and OO respectively. They're not used to distinguish between parametric and inclusion polymorphism. That's why they're misleading in this discussion.

    Static versus dynamic polymorphism is used to denote when methods are bound. Polymorphism here stands for "many methods with the same name". Static means it can be decided at compiletime which one of the many methods to call. Dynamic means this decision has to be deferred to runtime. So these terms are traditionally used to separate overloaded methods from overridden virtual methods, and that's not the topic of this thread.

    Also, the fact that I see a different method of thinking betwen GP and OO doesn't put them at different corners from a development point of view.
    The whole point of a classification is to separate things. If you think of a separation as being along a line or as putting things in different corners or buckets or whatever isn't that important really.

    If one were to classify GP and OO as design methods using the traditional top-down/bottom-up pair, I'd say OO would be top-down and GP would be bottom-up. I though this was what you meant when you said this,

    "Perhaps, the biggest difference between the two paradigms is not language constructs or techniques. Instead it is a method of thinking. With OO you define classes/interfaces and then build algorithms on top of them. With GP, it's the other way around: You define algorithms and then you build concepts and data structures that can be submitted to them. While in OO the focus of the abstraction process is in creating entities, in GP the focus of the abstraction process is creating algorithms. With this in mind it's easier to understand how GP could replace OO and vice-versa."

    Also Stepanov has referred to the GP design process as "lifting" which I interpret as meaning bottom-up.

    I don't understand what's your beef with this really. What are you in opposition of?

    -----

    Anyway I think I've said what I wanted in this discussion now. Thank you.
    Last edited by nuzzle; September 27th, 2009 at 05:59 AM.

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