9 karma · joined November 17, 2011
I take issue with your "functions/methods are data." remark. They are not. If they were, they'd be mutable, and I could process them, make copies of them, and change them the way I do other data. This is the wannabe lisper in me getting out, but there's a world of difference between treating your methods as data that you can pass around, and having them be data items that you can actually transform.
In C I can pass function pointers around, and do with some regularity, without making everything in my programs objects.
I realize that some OO languages have this ability, but the mainstream ones (java, C++, python, ruby) generally do not.
In C I would use structs and pass around pointers, then have functions that take those as arguments. This obviously sucks in the asynchronous case, but that paradigm has always felt more natural to me.
Put it another way: two examples. A) class Point with locals x,y,z and method 'distance' which takes a parameter that is another point. B) struct Point with components x,y,z. Then we have a function 'distance' which takes pointers to two Points.
Case B's - int d = distance(p1,p2); feels way more natural to me than Case A's - int d = p1.distance(p2);
Totally agree with the toolbox mentality, I've just rarely felt like the object hammer has felt like the right tool.
In my mind, a program is something that accepts input, does some processing on that input, and produces output. To me, the "programming" should revolve around the processing, rather than around the internal representation of the input, intermediate data, or output.
I actually really see the benefit of inheritance in many OO settings, in that it encourages abstraction. But, what's always baffled me is the insistence on the Nouns as a central point of focus in our programs.
To throw more heresy on the fire, I think the MVC paradigm is absolute crap, and don't want to see it ever again if I can avoid it.