I don't get all the OOP hate. It's really not hard to understand (you just have to visualize it properly, or just get someone to explain it to you in a decent way). Objects and classes were invented to represent real world concepts and high level programming lets you straight up code stuff and you don't really have to think about it, you just make it do what it's supposed to do. I absolutely can't stand fucking around with low level shit like memory management and bullshit like that. Car->run() and the fucking car runs. That's it.
Been learning Perl lately, it's pretty cool but VERY different, coming from C++ and Java.
Coming from a procedural AND low-level hardware background, I've had a bitch of a time getting my head around to Java and OOP in my job
I always keep returning to the idea with the aforementioned Car->run() concept, that "yes I can call that method, but where is the actual code that the method runs?"
And code reuse also. I don't see the problem of calling the same function with different parameters
At least I get to see the code, instead of just (to me unfathomably difficult to compute due to the simplicity) something like:
BackgroundMonitoring monitor = new BackgroundMonitoring();
ConnectionTestVO test = monitor.testConnection;
And when you open those methods, they seem to refer to themselves in a baffling loop-like circle jerk of circular references with no actual code
it works, but don't even ask me how...
I am more accustomed to something (simplified BS example) like:
// Lcd limit 16 chars
writeToLCD(0, 0, "Text on screen");
writeToLCD(unsigned int row, unsigned int position, string text) {
for(i=0;i<16;i++) {
char = getChar(text
);
SPDR = char; // write char to data register
PORTB = 0xFF; // flash light on received char
}
}
To me that is much easier to understand and update than the Java example, heh heh