News for hackers. Stuff that matters.
Re:How Class-based Programming Sucks (2011) by jonahx on Friday December 13, 2013 @09:38AM (#6900660)
OOP is not fundamentally about mapping your code to physical real-world objects, but about mapping it to natural, intuitive concepts. Those concepts can, and in many cases should, be as abstract as you like: eg, an "Algorithm" object.

Something like "RectangleCollectionColorPickerFactory" is obviously a confusing and ridiculous concept, and exemplifies a failed application of OOP, not a failure of OOP itself. One could invent equally absurd demonstrations of functional programming, or indeed of any other paradigm.

Re:How Class-based Programming Sucks (2011) by MartinCron on Friday December 13, 2013 @12:10PM (#6901588)
Those concepts can, and in many cases should, be as abstract as you like: eg, an "Algorithm" object.

I only really "got" design patterns when I realized that the strategy pattern was just treating an algorithm/implementation as an object and stopped thinking that OO was exclusively about mapping things to real world objects.

Re:How Class-based Programming Sucks (2011) by willismichael on Friday December 13, 2013 @10:56AM (#6901131)
Of course no true Scotsman would write a class like RectangleCollectionColorPickerFactory.