Live data from Hacker News

Object Oriented Programming is an expensive disaster which must end

smashcompany.com

61–70 of 123 posts

Re: Object Oriented Programming is an expensive disaster which must end

#61
post #57
post #48

Earlier quoted context omitted.

Whats wrong about the above code? Does it not do what it means to do? Is your personal feeling for how this construct should be written syntactically any measure of intelligence?

It can be written: return (NULL != lpDataPointer)

Or, taken to the extreme:

    return p;

Re: Object Oriented Programming is an expensive disaster which must end

#62
post #39

Earlier quoted context omitted.

The article pulls a Fallacy fallacy, otherwise known as an "argument from fallacy". Basically what he says is "none of the arguments against me are correct, because fallacy X". I simply ignore such statements, because they make discussion impossible.

Oh, so what happens if all the arguments against him are actually fallacious? You realise that you would have ignored him based on the fallacy of the Fallacy fallacy?

No, I wouldn't have. I ignore his claim that all arguments against him are True Scotsman Fallacies. I don't ignore the actual arguments against him, nor the one he makes. Any of those arguments may or may not be fallacious themselves, but that has no bearing on me ignoring his claim that they all are.

Re: Object Oriented Programming is an expensive disaster which must end

#63
post #58
post #57

Earlier quoted context omitted.

It can be written: return (NULL != lpDataPointer)

I know, it can also be written in many other ways. What decides which one is more correct if they are all semantically equivalent? Is it less characters? Is it using exactly as many 'e's as 'a's? Is it the unnecessary braces?

There is probably no "correct" way of writing this, but there are ways of making your next code maintainer's life easier (which might be you in a few months from now). One line is easier to read and understand than 10, especially if that one line is just "return p".

Re: Object Oriented Programming is an expensive disaster which must end

#64

As someone who is more familiar with OOP, I would love to see examples/hear more alternative approaches to organising code. Let's say that you want to design a CRUD app, but you're not going to use OOP. What are some of the ways you could choose to structure your code? Would you still use a pattern like MVC?

You can take a look at how apps are structured in Clojure with the [Luminus](http://www.luminusweb.net/docs) microframework as an example.

Re: Object Oriented Programming is an expensive disaster which must end

#65
post #39

Earlier quoted context omitted.

One of the major points of the article is the "no True OO Programmer" fallacy: this is my experience whenever I argue against Object Oriented Programming (OOP): no matter what evidence I bring up for consideration, it is dismissed as irrelevant. If I complain that Java is verbose, I’m told that True OOP Programmers let the IDE take care of some of the boilerplate, or perhaps I am told that Scala is better. If I compl…

The article pulls a Fallacy fallacy, otherwise known as an "argument from fallacy". Basically what he says is "none of the arguments against me are correct, because fallacy X". I simply ignore such statements, because they make discussion impossible.

You're committing a fallacy fallacy fallacy:

> Above, I have, with some humor, suggested that proponents of OOP tend to indulge the No True Scottsman fallacy when arguing for OOP. On a more serious note, some proponents of OOP might try to defend themselves by suggesting that we are facing issues of commensurability: proponents of the pure-logic paradigm, or the functional paradigm, or the OOP paradigm, talk past each other because we can not understand the axioms on which each other’s arguments rest.

> I am willing to believe that this issue explains some of the disconnect between some of the more thoughtful proponents of the different styles. And yet, there has to be something more going on, since the empirical evidence is so overwhelmingly against OOP. Proponents of OOP are arguing against reality itself, and they continue to do so, year after year, with an inflexibility that must have either non-rational or cynically financial sources.

Re: Object Oriented Programming is an expensive disaster which must end

#66

What OO brought to The table (and what many advocates of FP are forgetting) is context sensitivity, that is, functions/methods are brought in scope by the owning object rather. Typing dog.bark() is a thousand times more powerful in terms of tooling than bark(dog) or SomeDogPackage::bark(dog). I prefer the FP style of coding but I can't see average devs giving up on Java/C# style tools. Sure OO brought a lot of little…

The good parts of OO aren't exclusive to it though. For example, Clojure provides protocols (http://clojure.org/protocols) and multimethods (http://clojure.org/multimethods) which result in far more flexible polymorphism than a language like Java.

Re: Object Oriented Programming is an expensive disaster which must end

#67
post #38

In the article and elsewhere Clojure is often used as an example of an anti-OOP language, yet by either Alan Kay's definition (quoted in my previous comment) or by Bertran Meyer's definition^1 Clojure uses the object oriented paradigm. Clojure is more object oriented than PHP or C++ which only provide some OO-inspired data abstraction mechanisms, but are not based around them. ^1 «Object oriented software constructio…

OOP ideas aren't exclusive to that paradigm, turns out that things like polymorphism work very naturally in a functional language.

Re: Object Oriented Programming is an expensive disaster which must end

#69
post #61
post #57

Earlier quoted context omitted.

It can be written: return (NULL != lpDataPointer)

Or, taken to the extreme: return p;

Depends on the language. Clearly 'lpDataPointer' suggests C or C++, but if it was C# or Java then 'return p;' would only compile if 'p' was of boolean type.

Re: Object Oriented Programming is an expensive disaster which must end

#70
post #66

What OO brought to The table (and what many advocates of FP are forgetting) is context sensitivity, that is, functions/methods are brought in scope by the owning object rather. Typing dog.bark() is a thousand times more powerful in terms of tooling than bark(dog) or SomeDogPackage::bark(dog). I prefer the FP style of coding but I can't see average devs giving up on Java/C# style tools. Sure OO brought a lot of little…

The good parts of OO aren't exclusive to it though. For example, Clojure provides protocols ( http://clojure.org/protocols ) and multimethods ( http://clojure.org/multimethods ) which result in far more flexible polymorphism than a language like Java.

I agree many parts can be brought to FP but most importantly the languages of the future must be developed with tools in mind and in tandem with the tools. Too often new langs seem to be developed as command line compiled experiments which only (much) later get IDE support. At that point some decision may already have been made that makes tooling harder, such as not allowing or encouraging methods "on" types.
Post reply on HN