Live data from Hacker News

Joe Armstrong: Why OO Sucks

harmful.cat-v.org

241–250 of 267 posts

Re: Joe Armstrong: Why OO Sucks

#241

Earlier quoted context omitted.

Where do you get the crazy idea that you can't write functional programs? Or that SICP didn't have you write programs? SICP didn't start off with "theory"--it started off with PROGRAMMING. The programming that you did at first, however, just so happened to be recursion-heavy functional programming. The class then taught you how to build your own mutable object system out of the functional primitives, using closures a…

And there you go again, as the OP did. Self-praise, deprecation of others. What happened to humility? You can write functional programs. You can also write concatenative programs and logical programs. Why not we suggest that people should be required to learn about beating around the stack and predicates first? What makes functional programming so special? The hubris of its followers? I can tell you now what makes im…

> And there you go again, as the OP did. Self-praise, deprecation of others. What happened to humility?

That's surely the pot calling the kettle black! First of all, I didn't praise myself--I praised the education that I was fortunate enough to receive. It was first rate. Furthermore I'm not disparaging you because it's necessarily bad to learn imperative programming first. I'm disparaging your willful ignorance, and your knee-jerk assertion that people who learned to program in a different manner from how you learned, didn't learn to program at all.

Your attitude here is offensive and counter-productive.

Regarding what makes functional programming "special" is that it results in code that is easier to reason about, and consequently to maintain and adapt. It also increases the ability to write "reusable" code, which can then be used unmodified in future projects.

On the other hand, FP is not a magic elixir. It is just one of many techniques that a good software engineer should understand. At MIT, when I first was taught to program there as an undergraduate, it was, however, considered to be the most fundamental technique.

Re: Joe Armstrong: Why OO Sucks

#242

Earlier quoted context omitted.

Your hard-line stance is a little bit too far IMHO. That inanimate matter programming is all about manipulating also has no notion of objects or object orientation... or (for the most part) methods, fields, functions, procedures, arrays, modules, encapsulation, interfaces, garbage collection, databases ... and so on and so on. All that abstraction exists to make programming easier for humans to grok, and for teams to…

I would argue that objects, methods, fields, modules, encapsulation, interfaces, garbage collection, databases are not the basics of programming either. Good things to have, but are not basics of programming. So, teach/learn them later in the cycle. Basics of programming are variables, branches, arrays, loops and simple I/O. You can go a long way with these. And you can explain those to 6 yr old child.

> And you can explain those to 6 yr old child.

The most popular programming language for teaching children is Logo, a FUNCTIONAL programming language!

Re: Joe Armstrong: Why OO Sucks

#243

Earlier quoted context omitted.

And there you go again, as the OP did. Self-praise, deprecation of others. What happened to humility? You can write functional programs. You can also write concatenative programs and logical programs. Why not we suggest that people should be required to learn about beating around the stack and predicates first? What makes functional programming so special? The hubris of its followers? I can tell you now what makes im…

> And there you go again, as the OP did. Self-praise, deprecation of others. What happened to humility? That's surely the pot calling the kettle black! First of all, I didn't praise myself--I praised the education that I was fortunate enough to receive. It was first rate. Furthermore I'm not disparaging you because it's necessarily bad to learn imperative programming first. I'm disparaging your willful ignorance, and…

Victor Pelevin, a great writer, noted in his book Empire V: (my translation)

"The main idea that person tries to convey to others is that he has access to much better consumption than they would think. At the same time he tries to tell them that their way of consumption is much less of premium than they were thinking."

And now you're telling me that you had access to much better education and that my education surely sucked ass. It's like the part from Borat's Kazakhstan hymn about Uzbekistan.

I do not argue that FP results in code that is easier to reason about. I'm just aruing that you should not call FP concepts like immutability and referential transparency "basics of programming". Programming is big and basics implies something very small. The kind of taking with you to an uninhabited island.

Demanding everyone to pray to functional gods before they are allowed to learn any programming, as OP implied, is a naive and dangerous dream. You're not alone in this, please behave.

Re: Joe Armstrong: Why OO Sucks

#244

Earlier quoted context omitted.

> And there you go again, as the OP did. Self-praise, deprecation of others. What happened to humility? That's surely the pot calling the kettle black! First of all, I didn't praise myself--I praised the education that I was fortunate enough to receive. It was first rate. Furthermore I'm not disparaging you because it's necessarily bad to learn imperative programming first. I'm disparaging your willful ignorance, and…

Victor Pelevin, a great writer, noted in his book Empire V: (my translation) "The main idea that person tries to convey to others is that he has access to much better consumption than they would think. At the same time he tries to tell them that their way of consumption is much less of premium than they were thinking." And now you're telling me that you had access to much better education and that my education surely…

> And now you're telling me that you had access to much better education and that my education surely sucked ass.

Your education is obviously lacking because you say uneducated things. It's as simple as that.

For instance, you asserted that if someone's first programming class started off with functional programming, then they didn't learn to program at all. That assertion is offensive, uneducated malarky. The quality of your education speaks for itself.

As to what people should have to do before learning any programming: no one has implied any such thing.

As to behaving: you first!

Re: Joe Armstrong: Why OO Sucks

#245

Earlier quoted context omitted.

Victor Pelevin, a great writer, noted in his book Empire V: (my translation) "The main idea that person tries to convey to others is that he has access to much better consumption than they would think. At the same time he tries to tell them that their way of consumption is much less of premium than they were thinking." And now you're telling me that you had access to much better education and that my education surely…

> And now you're telling me that you had access to much better education and that my education surely sucked ass. Your education is obviously lacking because you say uneducated things. It's as simple as that. For instance, you asserted that if someone's first programming class started off with functional programming, then they didn't learn to program at all. That assertion is offensive, uneducated malarky. The qualit…

"As to what people should have to do before learning any programming: no one has implied any such thing."

"People should be required to learn the basics of programming first. They should start with immutable data objects, referentially transparent functions."

You either lie or "should" means different thing in your English than "should".

Re: Joe Armstrong: Why OO Sucks

#246
post #215
post #168

Earlier quoted context omitted.

To attach behaviour to data in a functional language, you typically use first-class functions. Your draw function would look for a function in each drawable object and call it. To your second question: find some great open source projects and read their code.

The problem with open source projects is that great != popular. There are certainly a lot of very successful projects that have painfully unmaintainable code that still get maintained because so many people are invested. And the problem with great open source projects is that they'll only show you how they did their problem right - but seeing how to do it wrong and _why_ it's wrong is typically a more useful process.…

Excellent points. I'm doing a lot of code reading myself these days so it's nice to be reminded of some of the risks. :)

Re: Joe Armstrong: Why OO Sucks

#247

Earlier quoted context omitted.

> And now you're telling me that you had access to much better education and that my education surely sucked ass. Your education is obviously lacking because you say uneducated things. It's as simple as that. For instance, you asserted that if someone's first programming class started off with functional programming, then they didn't learn to program at all. That assertion is offensive, uneducated malarky. The qualit…

"As to what people should have to do before learning any programming: no one has implied any such thing." "People should be required to learn the basics of programming first. They should start with immutable data objects, referentially transparent functions." You either lie or "should" means different thing in your English than "should".

As to that quote, firstly you give it stronger weight than it was intended to convey. It was someone's opinion on the best way to educate, not a statement about use of force to allow or disallow anything.

More importantly, that quote is neither here nor there in the discussion between you and me. I did not utter it, you did not utter it, and the OP did not utter it. Therefore it is irrelevant without you having alerted me to what particular bee you have in your bonnet.

Additionally, it almost certainly true that any first class in programming should start with numbers, which are immutable data objects, and mathematical functions, which are referentially transparent.

E.g.,

   def inc(x): return x + 1
Consequently, there is nothing at all incorrect about that assertion.

In any case, I am done with this conversation, and in conversing with you. You have a very rigid and myopic and, yes, ill-educated opinion. I do not wish to converse with you further.

Re: Joe Armstrong: Why OO Sucks

#248

Earlier quoted context omitted.

> State is a side effect. In fact, that's basically the definition of side effect -- I think you need to revisit the basic principles of formal semantics. You're right, thanks for the correction. My line of thinking was that addressing the issue of side effects in programmatic functions was not the same thing as addressing state -- while not mutually exclusive, they're not the same thing. > State is the entire point…

I won't go so far as state being the entire point, but it's simply another way to programmatically solve a problem. Writing to memory is stateful. Writing to a file is stateful. Printing something to the screen is stateful. Seeing the effect of your program is stateful. Would you say that the point of programming is to produce an effect?

That's fine. All your points are perfectly valid, but they have nothing to do with OOP, which is what I was referencing.

Re: Joe Armstrong: Why OO Sucks

#249

Earlier quoted context omitted.

>Immutable data objects and all the stuff are not the basics of programming. They never were. Unless you single-handedly redefine the meaning of "programming". Immutability was considered to be more fundamental when I took my first programming course at MIT. I received a very good education. We, of course, eventually moved onto objects with mutable, but they were definitely considered to be more dangerous and less fu…

It means the course wasn't about programming. Maybe it was misnamed or maybe you approximate its real title. Me, not really interested in what people who never wrote any widely used software consider more what and less what. Programming is what happens (and always happened) on top of computing devices that have, you know, memory, registers and opcodes. It's just the hard truth. That's what programming is. Writing cod…

> It means the course wasn't about programming.

You've pretty much blown any credibility you had right there.

Re: Joe Armstrong: Why OO Sucks

#250

Earlier quoted context omitted.

Programming is not like breathing.

Why?

Does this really need to be said?

One is a semi-automated bodily process necessary for extracting oxygen from the atmosphere, and the other is writing instructions in strictly defined languages to control the resources of computer systems.

Other than a contrived emotional connection you might make between the two, they aren't comparable.

Post reply on HN