News for hackers. Stuff that matters.
Re:Why OO Sucks by Joe Armstrong (2000) by foobar_ on Monday April 22, 2019 @09:08AM (#19718593)
> That's not true, you can always have a "send_message(string id)". Few people do it because you lose static type safety. And some languages, like C# and Scala, have dynamic types that allows for the "method_missing" protocol and such features are very unpopular.

That is the difference. If every class in C++ had only one method - send_message and each object is an independent thread, you will get how Erlang works. That is how you would do the actor model in C++.

Inheritance, Polymorphism is emphasised in Java, C++ and C#, whereas Functional programmers emphasise function objects / lambdas / Command Pattern where you just have one method - calling the function. Infact having just method you no longer need Polymorphism / Interfaces.

Re:Why OO Sucks by Joe Armstrong (2000) by bad_user on Monday April 22, 2019 @11:24PM (#19725322)
What? This has nothing to do with functional programming.

FP needs polymorphism too and as a matter of fact FP tends to be even more static.

In FP we have type classes, built via OOP in static OOP languages.

> Infact having just method you no longer need Polymorphism / Interfaces.

That’s false.

Re:Why OO Sucks by Joe Armstrong (2000) by foobar_ on Tuesday April 23, 2019 @01:21AM (#19725800)
It's not. You can use multiple dispatch.
Re:Why OO Sucks by Joe Armstrong (2000) by sideshowb on Tuesday April 23, 2019 @04:02AM (#19726488)
But then why would you? Isn't ditching type safety a bad idea most of the time ?