News for hackers. Stuff that matters.
Re:Which Programming Languages Are Functional? by lmm on Wednesday December 30, 2015 @10:33AM (#10812417)
Objects are arguably just syntactic sugar for passing a bag of state around (where some of that state might be function values). This becomes very clear if you've ever done OO in C (with a manual virtual function table).

A lot of the argument for "composition over inheritance", SOLID etc. is separating the pieces of state that specific object methods depend on. I don't think the Python approach helps that much in practice (since method calls look exactly the same), but it does make it much clearer where anything referenced in a method body has to be coming from.

There are no comments on this comment yet.