Hacker News new | ask | show | jobs
by crimsonalucard 3341 days ago
Is this guy talking about OO as described by smalltalk? Because he says that objects are bags of functions, not data, but in languages like java, c# and c++ objects are bags of both.
3 comments

Yes, he is probably talking about Smalltalk-style OO:

https://medium.com/@richardeng/domo-arigato-mr-smalltalk-aa8...

He's also the subject of this article: https://thenewstack.io/can-man-spark-renaissance-smalltalk-p..., which made the front page of HN a while back (https://news.ycombinator.com/item?id=13642947)

It's Uncle Bob who says objects are bags of functions. And this is not specific to Smalltalk nor dynamic languages. In Java, C#, and C++, objects are still just bags of functions.
Java and C# allow you to expose mutable fields, so objects are not strictly (or even ordinarily) just bags of functions.
Yeah but objects in those languages are also bags of data, which he explicitly said they are not.
The C++ family of languages isn't really all that object-oriented; it's practically a different (static, class-oriented) paradigm that takes some inspiration from OOP (mostly from Smalltalk) but more from C's particular implementation of statically-typed procedural programming, as a result they are based around structs-enhanced-with-methods rather than proper objects.