Live data from Hacker News

Joe Armstrong: Why OO Sucks

harmful.cat-v.org

201–210 of 267 posts

Re: Joe Armstrong: Why OO Sucks

#201

Earlier quoted context omitted.

Programming is about writing some code that does useful work. Okay? When you argue that programming is something else, you're doing just that: redefining. Because from the first days programming meant building computational devices or programming programmable devices. And those have changing state, and then they have machine code, which mutates state. It's how it always was and now some people want to redefine it but…

Turing machines have mutable state. The lambda calculus does not. Yet any algorithm which can be expressed by one can also be expressed by the other. We have proof that state is merely an implementation detail, which happens to be widespread in today's hardware because we figured out how to implement it at scale. Programmers need to understand the difference between the abstract algorithm they're trying to express an…

State is an implementation detail to today's hardware

And yesterday's hadware

And the day before that

And pretty long time, frankly - do you see a pattern here? And it does have its deep reasons.

Programming is not about algorithms. It's about making inanimate matter behave. CS might be about algorithms, but CS is not programming.

Re: Joe Armstrong: Why OO Sucks

#202

Earlier quoted context omitted.

"People should be required to learn the basics of programming first. They should start with immutable data objects" 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". The whole text you just wrote is full with dumb self-praise and deprecation of others; based on worship of principles that were never proven to p…

>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 code that compiles (interprets) as machine code for said computing devices. All other kinds of stuff - not programming. Call it CS, call it whatever.

Re: Joe Armstrong: Why OO Sucks

#203

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…

"Me, not really interested in what people who never wrote any widely used software consider more what and less what."

This argument is getting really really really old. Anyone with 5 minutes and a working internet connection can find hundreds of successful widely used applications written with a focus on immutability, either at the language level or the design level.

Re: Joe Armstrong: Why OO Sucks

#204

Earlier quoted context omitted.

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…

"Me, not really interested in what people who never wrote any widely used software consider more what and less what." This argument is getting really really really old. Anyone with 5 minutes and a working internet connection can find hundreds of successful widely used applications written with a focus on immutability, either at the language level or the design level.

Two points:

The people who write software with focus on immutability are not the same people who advocate pushing immutability down the students' throats. For example, I do write some functional code, but pragmatically.

And even after that, the total share of functional code is negligible. Sad but true.

Re: Joe Armstrong: Why OO Sucks

#205

The people who originally came up with OOP knew what they were doing. The inspiration was the cell, which hides immense mechanical complexity behind a simpler interface of electrical and chemical signals. When interfaces are simple, it limits the unexpected dependencies that can exist between software modules. Alan Kay wasn't saying, "Go off and write bloated objects" but, "When software must be complex, strive to pr…

"The inspiration was the cell."

That's news to me, although I dont claim to be an OO historian. The original OO language was Simula which was devised to do discrete event simulations. Its direct antecedent was work done on Monte Carlo simulations. Smalltalk and C++ were both inspired by Simula.

Re: Joe Armstrong: Why OO Sucks

#206
post #118

Earlier quoted context omitted.

To a certain extent it may depend on context (eg code for a conveyancing firm would have a different focus to that of a landlord or mortgage company), but a lot of those instances would already be properties of other instances. In particular, since the contract is the object which ties them all together, I would imagine the best syntax would be closer to: contract = new Contract(property, seller, buyer, agent) contra…

That could be a useful solution (and the one I would probably choose as well), but what if you primarily need polymorphism along the property type hierarchy because the sale of a home is so different from the sale of a mall? Also, you get the objection that contracts don't sign themselves. I remember very well that in the early 90s, OO models were promoted as a means for business people to talk to software designers.…

Like I said, your implementation would depend on context, but to adapt my example, I'd probably put a function on the Property class to determine which Contract class to use - something like:

  contract = property.create_contract(seller, buyer, agent)
  contract.sign()
However, I think from what you're saying that your sell_property() function would need awareness of all property types, so adding a property type not only requires changes to the part of the code which contains the property data structure, but also to the sell_property() function - and any other function throughout your code base which uses properties. That is of course possible, but OO does make it easier to find where to implement logic specific to different property types.

Re: Joe Armstrong: Why OO Sucks

#207
post #79

Earlier quoted context omitted.

The second link is to gibberish from reddit. Not sure if it's a joke or if it represents the opinions of cat-v. But the first link is on the money. I would not call it "odd" as that seems to carry a negative connotation. Rather, it's sensible, albeit irreverent, thinking to question dynamic linking (as the Plan 9 people have) and alas the mainstream of software development has a difficult time thinking sensibly and p…

Well, I'd distinguish your "maybe there's a better way" from the article's > All the purported benefits of dynamic linking [..] are myths while it creates great (and often ignored) problems. which is tripe. In my view, the fundamental problem with static linking as we currently know it is that when libraries release bug fixes-- especially security fixes (which I think are the real clincher), but really any of the min…

"So you really need an automatic re-linker of some sort and probably a new binary format that can be re-linked, and some infrastructure to keep track of what binaries exist on the system and what they depend on. Plan 9 never had that."

Plan 9 has all of those things. Namely 7l† and mk††.

http://plan9.bell-labs.com/magic/man2html/1/2l

†† http://plan9.bell-labs.com/magic/man2html/1/mk

Re: Joe Armstrong: Why OO Sucks

#208
post #98

Earlier quoted context omitted.

I don't think Joe ever claimed to be a great programmer. Erlang looks as odd as it does because it was hacked up in Prolog, which few compiler engineers would choose as a starting point. I think Erlang is interesting precisely because it was created by someone with a little distance.

I take it you have never written anything significant in Erlang? Try writing something in erlang and I bet you'll see the real power of pattern matching, supervision trees, and the whole message passing infrastructure. If the people who wrote Erlang weren't good programmers they certainly got lucky.

You seem to have mistaken my comment for a criticism of Erlang.

Re: Joe Armstrong: Why OO Sucks

#209

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.

Parent of your comment might have been talking the Structure and Interpretation of Computer Programs. Likely it needs no introduction, but it is absolutely about programming, and goes right down the rabbit-hole to implementing interpreters, virtual register machines, and a compiler for said machine. Yes, the first couple of chapters is mostly purely functional, but that doesn't detract from the rest, which includes mutable code as well.

Really, I don't know why you're so hostile to this pedagogical approach. Do you have experience with teaching CS and/or programming, and have found using C or assembly or following some kind of Java school curriculum more effective? Have you found teaching functional programming first deficient? Or maybe you're looking at this from the perspective of an employer and have had to deal with hiring new grads who are brain damaged by functional intro CS classes?

I, for one, welcome this kind of experimentation or change of pace on the part of CS educators like Robert Harper at CMU (http://existentialtype.wordpress.com/). It can't be worse than what I had (mediocre, big box state Java school)

Re: Joe Armstrong: Why OO Sucks

#210
post #189
post #98

Earlier quoted context omitted.

I don't think Joe ever claimed to be a great programmer. Erlang looks as odd as it does because it was hacked up in Prolog, which few compiler engineers would choose as a starting point. I think Erlang is interesting precisely because it was created by someone with a little distance.

Armstrong fan here :) Jokes away - the "really great programmers" for me are people who can do extremely complex things very simple. For me, Armstrong is somewhere near Peter Norvig. Both made me change my point of view, some complex things became simple (and some simple things became not so simple). "Erlang was hacked up in Prolog" - it's the same as "Java was hacked in C". First implementation of Erlang was written…

No; because C is a fine implementation language. It's low-level enough to be efficient without a lot of moving parts, there's very little magic.

For me, Armstrong got interested in the idea of building reliable systems, went off and did a PhD on the topic, and then created a prototype implementation of the concepts developed therein in Prolog - a declarative language essentially built around combinatorial search with pruning. In other words, he's a fine high-level thinker, and a very competent wielder of Prolog; but I believe I've read elsewhere that it was Mike Williams who rewrote the VM interpreter in C, and all the low-level imperative stuff like GC.

Post reply on HN