Contrast this to the Alan Kay post currently at the top of the news list. <a href="https://news.ycombinator.com/item?id=9481074" rel="nofollow">https://news.ycombinator.com/item?id=9481074</a><p>I may believe in many ways Erlang is an evolution to Smalltalk, a better way to program. But I read Kay and it feels like an educator talking, explaining the reasons for some decisions. I read this and it comes across as bitter rant about why my favorite language didn't get popular. Kay's Smalltalk was never popular either. This argument preferring Erlang might be right at its core, but it's hard to get past the bits of the argument presented that are petty or plain wrong.<p>Objection 1 - Data structure and functions are bound together
Objection 2 - Everything is an object<p>Arguably OO is a shorthand for enabling two things:
- message passing based on function signature
- a given data structure as the first argument ("this")<p>The message passing thing, Erlang handled a different way through the actor model, one that took concurrency in mind which was not in Smalltalk's early objectives. Erlang is arguably a better way.<p>However I (just me; probably not alone) originally found it hard to understand some Erlang programs because it's a pile of functions - the patterns and protocols against the data structures are all subtext and one needs to read a lot of example code to grasp them. Whereas objects and interfaces make the message passing protocols pretty clear, only a couple examples and I get the message.<p>One of the major nuances of OO and Smalltalk was that the language was only half of the story, Smalltalk was also a runtime and IDE, that made browsing and modifying code a joy. The image based approach has a ton of drawbacks compared to text files, of course, but now there are plenty of Smalltalk-like IDEs or code-browsing friendly text editors for both OO languages and functional languages such that anyone should be able to "suck it up" and follow the call chains and interrelationships.<p>Objection 3 - Data type declarations are all over the place<p>This seems subjective depending on the language, and even just wrong. Inheritance isn't required to reuse a data structure, OO design prefers composition. Most classes are composed out of fundamental data structures that are located in a well defined package.<p>Objection 4 - Objects have private state<p>Alan Kay agreed that mutable state is the root of all evil, or as he says, "assignment is a metalevel change". This is why he made state private!<p>I'm not sure what his point is here, as when you need shared mutable state in Erlang, you build an Actor to maintain and HIDE the mutable state. Which looks a heck of a lot like an object.