Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • Thank you for the point! As you said if algorithm is just some steps, then OOP can help us to provide more abstract steps. You pointed about "implementing algorithms in OOP", I modified my question to ask is it always beneficial? Commented Feb 6, 2015 at 14:19
  • 1
    you are confusing OOP with "Design by Contract". It's very well useful without OOP, and most OOP languages (C#, Java) don't provide real support for it (they support simple interfaces, not pre/post conditions) Commented Feb 6, 2015 at 15:47
  • 1
    @AK_ I agree that Design by Contract is the correct name for the commonality described in my answer. What I am claiming is that OOP as a design paradigm strongly embraces Design by Contract - just read any OOP textbook. My original answer also mentions that this commonality is not exclusive to OOP. Commented Feb 6, 2015 at 16:06