<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.atalasoft.de/cs/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Why OO may not suck, or, Take a ride on the Falsus Omnibus</title><link>http://www.atalasoft.de/cs/blogs/rickm/archive/2009/02/11/why-oo-is-not-so-bad-but-could-be-better.aspx</link><description>This post is in response to Joe Armstrong’s Why OO Sucks .&amp;#160; While I feel that Joe’s post reads more like an sermon than a stream of rational thought, it does bring up a number of misconceptions I feel many people in the functional programming world</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Why OO may not suck, or, Take a ride on the Falsus Omnibus</title><link>http://www.atalasoft.de/cs/blogs/rickm/archive/2009/02/11/why-oo-is-not-so-bad-but-could-be-better.aspx#17456</link><pubDate>Wed, 11 Feb 2009 12:43:30 GMT</pubDate><guid isPermaLink="false">647108ca-f046-4d8d-9feb-a7fbd2049b37:17456</guid><dc:creator>Keith Braithwaite</dc:creator><description>&lt;p&gt;The thing that i find most strange about Armstrong's opinions regarding object-orientation is that Erlang is an excellent vehicle for OO programming and what I've seen of Erlang systems with a non-trivial number of processes they are exactly object-oriented in construction.&lt;/p&gt;</description></item><item><title>re: Why OO may not suck, or, Take a ride on the Falsus Omnibus</title><link>http://www.atalasoft.de/cs/blogs/rickm/archive/2009/02/11/why-oo-is-not-so-bad-but-could-be-better.aspx#17457</link><pubDate>Wed, 11 Feb 2009 14:20:09 GMT</pubDate><guid isPermaLink="false">647108ca-f046-4d8d-9feb-a7fbd2049b37:17457</guid><dc:creator>Panzergrenadier</dc:creator><description>&lt;p&gt;Object oriented programming is an MBA style bullshit turned into programming &amp;quot;paradigm&amp;quot;. To become really useful programmers, people should learn algorithms, instead they just spent time babbling about &amp;quot;design&amp;quot;, &amp;quot;layers&amp;quot; and &amp;quot;patterns&amp;quot; on meetings.&lt;/p&gt;</description></item><item><title>re: Why OO may not suck, or, Take a ride on the Falsus Omnibus</title><link>http://www.atalasoft.de/cs/blogs/rickm/archive/2009/02/11/why-oo-is-not-so-bad-but-could-be-better.aspx#17458</link><pubDate>Wed, 11 Feb 2009 14:52:24 GMT</pubDate><guid isPermaLink="false">647108ca-f046-4d8d-9feb-a7fbd2049b37:17458</guid><dc:creator>David MCLaughlin</dc:creator><description>&lt;p&gt;@ Panzergrenadier &amp;nbsp;&lt;/p&gt;
&lt;p&gt;The reason &amp;quot;design&amp;quot;, &amp;quot;layers&amp;quot; and &amp;quot;patterns&amp;quot; are discussed so much is because the amount of time spent maintaining awful code is a serious issue in nearly every corporate environment. &lt;/p&gt;
&lt;p&gt;If you approach performance optimisation as &amp;quot;hit the largest bottleneck first&amp;quot; then the amount of nanoseconds wasted in a sub-optimum algorithm always pales in significance compared to the amoune of weeks spent trying to work with a poorly designed system. &lt;/p&gt;</description></item><item><title>Why OO may not suck, or, Take a ride on the Falsus Omnibus</title><link>http://www.atalasoft.de/cs/blogs/rickm/archive/2009/02/11/why-oo-is-not-so-bad-but-could-be-better.aspx#17462</link><pubDate>Wed, 11 Feb 2009 15:12:50 GMT</pubDate><guid isPermaLink="false">647108ca-f046-4d8d-9feb-a7fbd2049b37:17462</guid><dc:creator>Aggregator @ Bitubique</dc:creator><description>&lt;p&gt;submitted by gst to programming [link] [3 comments]&lt;/p&gt;
</description></item><item><title>re: Why OO may not suck, or, Take a ride on the Falsus Omnibus</title><link>http://www.atalasoft.de/cs/blogs/rickm/archive/2009/02/11/why-oo-is-not-so-bad-but-could-be-better.aspx#17463</link><pubDate>Wed, 11 Feb 2009 15:59:34 GMT</pubDate><guid isPermaLink="false">647108ca-f046-4d8d-9feb-a7fbd2049b37:17463</guid><dc:creator>matt</dc:creator><description>&lt;p&gt;@Panzergrenadier:&lt;/p&gt;
&lt;p&gt;&amp;quot;To become really useful programmers, people should learn algorithms, instead they just spent time babbling about &amp;quot;design&amp;quot;, &amp;quot;layers&amp;quot; and &amp;quot;patterns&amp;quot; on meetings.&amp;quot;&lt;/p&gt;
&lt;p&gt;Um...you realize that algorithms are just answers to patterns right? &amp;nbsp;Same with data structures. &amp;nbsp;&amp;quot;Patterns&amp;quot; just take that and start to apply them at a higher level.&lt;/p&gt;
&lt;p&gt;When you realize you need to search something...or map something...or sort something....you've hit a pattern.&lt;/p&gt;</description></item><item><title>re: Why OO may not suck, or, Take a ride on the Falsus Omnibus</title><link>http://www.atalasoft.de/cs/blogs/rickm/archive/2009/02/11/why-oo-is-not-so-bad-but-could-be-better.aspx#17464</link><pubDate>Wed, 11 Feb 2009 16:30:11 GMT</pubDate><guid isPermaLink="false">647108ca-f046-4d8d-9feb-a7fbd2049b37:17464</guid><dc:creator>Steve Goguen</dc:creator><description>&lt;p&gt; &amp;nbsp;It seems like the biggest problem when talking about OO, is that you are ultimately talking about data types and functions and how to relate them conceptually in a useful way. &amp;nbsp;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;When you really distill what a basic object is, you end up really talking about a data type and a set of functions that operate on that data type. &amp;nbsp;I know the traditional definition of OO requires that it be based on encapsulation, inheritance, and polymorphism, but I take issue with that. &amp;nbsp;The only thing I believe is required for an OO system is some mechanism for implementing some type of polymorphic interface. &amp;nbsp;If you really think about it, encapsulation and inheritance are really just compiler features to assist in creating a polymorphic interface. &lt;/p&gt;
&lt;p&gt; &amp;nbsp;The point is: &amp;nbsp;When it comes down to it, you can implement all of these object-oriented features and concepts in a non-OO language like C. &amp;nbsp;Sure, the syntax might not reflect what you're doing conceptually, but you do have the power to implement these features yourself. &amp;nbsp;But why? &amp;nbsp;Why would you want to implement these features yourself?&lt;/p&gt;
&lt;p&gt; &amp;nbsp;What Joe did with Erlang is reduce his language down to what he thought was the most essential features. &amp;nbsp;Rather than concocting a complex type system that imposes rules like, &amp;quot;all polymorphism must be done through interfaces&amp;quot; and &amp;quot;no multiple inheritance allowed&amp;quot;, he implemented a much more flexible system that focuses more on the polymorphism side of objects using pattern matching system. &amp;nbsp;With pattern matching, I can define 5 different behaviors for the same function on the same data type, where as I'm limited to 1 function with a bunch of if statements with an OO interface.&lt;/p&gt;
&lt;p&gt; &amp;nbsp;Let's say I had a list that contains strings, integer, and a few different types of records and I wanted to format each type a specific way, depending on its data type. &amp;nbsp;With a traditional OO language like Java or C++, implemented polymorphic functions is restricted to class types, and you can't extend primitive types because they are usually sealed. &amp;nbsp;With Erlang, I simply define 4-5 different implementations of the function or each data type and then call that function for each item in the list. &amp;nbsp;Hell, I can define a default function that matches objects that weren't specified. &amp;nbsp;There are a lot of times I wish traditional OO language allowed me to do that. &amp;nbsp;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;Now, dynamic languages like Ruby and JavaScript allow you to add class specific methods at runtime (a process aptly named &amp;quot;monkey-patching&amp;quot;), but that's riddled with problems as it creates naming collisions, which becomes a REAL problem if you're the kind of person who believes in reusing components. &amp;nbsp;(Ask any JavaScript or ROR programmer if about these types of name collections.)&lt;/p&gt;
&lt;p&gt; &amp;nbsp;I'm not saying that OO is entirely bad, nor am I saying that Erlang is God's gift and Joe Armstrong is his prophet. &amp;nbsp;I've been doing OO for 15 years now, and I think that objects are a good abstraction for a lot of things. &amp;nbsp;However, I think the way we think about objects and what they are need to be challenged. &amp;nbsp;There are a lot of artificial restrictions, for many languages, that end up holding us back or forcing us to shoehorn a good design into an overly restrictive type system. &amp;nbsp;On the other hand, there are also too many liberties that allow too many programmers to shoot themselves in the foot.&lt;/p&gt;
&lt;p&gt; &amp;nbsp;All in all, I agree with your thesis that not all OO systems suck, but I do believe that a majority of them do, which is why I think we should let the OO bashing begin. &amp;nbsp;I personally can't think of a better and more effective way of evolving OO than vigorously challenge its core principles. &amp;nbsp;It forces people to consider the weak points in OO and separate them from the strong points.&lt;/p&gt;</description></item><item><title>re: Why OO may not suck, or, Take a ride on the Falsus Omnibus</title><link>http://www.atalasoft.de/cs/blogs/rickm/archive/2009/02/11/why-oo-is-not-so-bad-but-could-be-better.aspx#17466</link><pubDate>Wed, 11 Feb 2009 16:42:53 GMT</pubDate><guid isPermaLink="false">647108ca-f046-4d8d-9feb-a7fbd2049b37:17466</guid><dc:creator>frederiksen</dc:creator><description>&lt;p&gt;I agree with Joe's point about state. &amp;nbsp;Sure, in so many situations state is crucial. &amp;nbsp;In hardware, finite state machines are a must. &amp;nbsp;But having every single object keep its own state? &amp;nbsp;The amount of permutations of objects and states is damn near infinite and impossible to test.&lt;/p&gt;
&lt;p&gt;Patterns seem to me to be another level of (unneeded) abstraction in problem solving. &amp;nbsp;It confuses the issue and doesn't add anything. &amp;nbsp;Maybe languages like Smalltalk do OO better, but my years with C++ and Java make me think OO is trying to fit a round peg into a square hole.&lt;/p&gt;
&lt;p&gt;I think OO should just be another tool of a language. &amp;nbsp;There are some situations where it is very elegant. &amp;nbsp;But trying to do absolutely everything with objects requires some pretty serious hammering on the problem to make it fit in OO-space.&lt;/p&gt;</description></item><item><title>re: Why OO may not suck, or, Take a ride on the Falsus Omnibus</title><link>http://www.atalasoft.de/cs/blogs/rickm/archive/2009/02/11/why-oo-is-not-so-bad-but-could-be-better.aspx#17467</link><pubDate>Wed, 11 Feb 2009 16:48:42 GMT</pubDate><guid isPermaLink="false">647108ca-f046-4d8d-9feb-a7fbd2049b37:17467</guid><dc:creator>Jacob</dc:creator><description>&lt;p&gt;Well, the most obvious argument for OOP (imo) is kind of ignored here. Let's say you're using C. &lt;/p&gt;
&lt;p&gt;All strings are represented in a consistent manner. In this case it would be a character array ending with a null terminator.&lt;/p&gt;
&lt;p&gt;All functions in string.h act on data represented in the manner in which all strings are described. These functions aren't useful when applied to data organized in a different manner.&lt;/p&gt;
&lt;p&gt;Most of the functions in string.h begin with the three-letter prefix str, which seems to me like a shout to replace that prefix in a manner that's more compact, readable, and direct.&lt;/p&gt;
&lt;p&gt;In addition, private data allows certain functionality to be done more efficiently. Unfortunately, abstraction can lead to patterns going unnoticed, but I don't believe this to be a major issue.&lt;/p&gt;</description></item><item><title>re: Why OO may not suck, or, Take a ride on the Falsus Omnibus</title><link>http://www.atalasoft.de/cs/blogs/rickm/archive/2009/02/11/why-oo-is-not-so-bad-but-could-be-better.aspx#17468</link><pubDate>Wed, 11 Feb 2009 17:11:05 GMT</pubDate><guid isPermaLink="false">647108ca-f046-4d8d-9feb-a7fbd2049b37:17468</guid><dc:creator>Luke Plant</dc:creator><description>&lt;p&gt;You asked for a &amp;quot;compelling reason as to why it is wrong to couple transformations with the data structure that they are able to be applied to&amp;quot;.&lt;/p&gt;
&lt;p&gt;The need for multiple dispatch often provides such a reason. &amp;nbsp;Just look at the implementation of a .Equals() method or .Compare() (or __eq__() etc.), then compare to how something like Haskell does it (using typeclasses, or sometimes using pattern matching). &amp;nbsp;You immediately see that a .Equals() method is an unnatural and wrong thing to do, but you don't see that until you realise the alternative.&lt;/p&gt;
&lt;p&gt;Generalising, solutions in OO languages often end up biased to the tool that you have (single dispatch), which seem OK at the time, but stepping back you realise that it isn't actually very nice.&lt;/p&gt;</description></item><item><title>re: Why OO may not suck, or, Take a ride on the Falsus Omnibus</title><link>http://www.atalasoft.de/cs/blogs/rickm/archive/2009/02/11/why-oo-is-not-so-bad-but-could-be-better.aspx#17469</link><pubDate>Wed, 11 Feb 2009 22:47:23 GMT</pubDate><guid isPermaLink="false">647108ca-f046-4d8d-9feb-a7fbd2049b37:17469</guid><dc:creator>Matt</dc:creator><description>&lt;p&gt;Discussions on OO are often fruitless because everybody supplies their own definition of what it means. &amp;nbsp;I'm curious what definition of OO the author has in mind. &amp;nbsp;Something like:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://www.paulgraham.com/reesoo.html"&gt;http://www.paulgraham.com/reesoo.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Otherwise, the term &amp;quot;Object Oriented&amp;quot; that we're discussing might not even mean anything at all:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://apocalisp.wordpress.com/2008/12/04/no-such-thing/"&gt;http://apocalisp.wordpress.com/2008/12/04/no-such-thing/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Matt&lt;/p&gt;</description></item></channel></rss>