Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><a href="http://wordnetweb.princeton.edu/perl/webwn?s=orthogonal" rel="noreferrer">Orthogonality</a> implies that two things are unrelated. It comes from mathematics where it means <a href="http://en.wikipedia.org/wiki/Orthogonality" rel="noreferrer">perpendicular</a>. In common usage it can mean two decisions are unrelated or that one subject is irrelevant when considering another subject. As used here, orthogonal means that one concept doesn't either imply or exclude the other.</p> <p>The two concepts <a href="http://en.wikipedia.org/wiki/Object-oriented_programming" rel="noreferrer">object oriented programming</a> and <a href="http://en.wikipedia.org/wiki/Functional_programming" rel="noreferrer">functional programming</a> are not incompatible with each other. Object orientedness does not imply mutability. Many people who are introduced to object oriented programs the traditional way often first use C++, Java, C# or similar languages where mutability is common and even encouraged (standard libraries provide a varierty of mutable classes for people to use). Therefore it is understandable that many people associate object oriented programming with imperative programming and mutability, as this is how they have learned it.</p> <p>However object oriented programming covers topics like:</p> <ul> <li>Encapsulation</li> <li>Polymorphism</li> <li>Abstraction</li> </ul> <p>None of this implies mutability, and none of it excludes functional programming. So yes they are <em>orthogonal</em> in that they are different concepts. They are not opposites - you can use one, or the other, or both (or even neither). Languages like Scala and F# attempt to combine both paradigms into a single language:</p> <blockquote> <p>Scala is a multi-paradigm programming language designed to integrate features of <strong>object-oriented programming and functional programming</strong>.</p> </blockquote> <p><a href="http://en.wikipedia.org/wiki/Scala_%28programming_language%29" rel="noreferrer">Source</a></p> <blockquote> <p>F# is a succinct, expressive and efficient <strong>functional</strong> and <strong>object-oriented language</strong> for .NET which helps you write simple code to solve complex problems.</p> </blockquote> <p><a href="http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/default.aspx" rel="noreferrer">Source</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload