Goodbye OOP
Posted: Tue Jul 26, 2016 12:02 am
I agree. However, the problem doesn't lie with OOP but with the classes and the students. It takes a long time to get proficient at programming in whatever language or paradigm you're choosing. Programming is hard.And these promises are still being made to naive programmers sitting in classrooms, reading blogs and taking online courses.
lol i think you nailed it, because it seems people either love the abstraction or hate it - seemingly with very little middle ground!? me I hate OOP because it acts as OBSCURITY between the source code and the resulting asm (i know obscurity isnt its purpose but its still an end result, and it doesnt seem to be an obscurity that provides security against crackers either), whereas with procedural everything in my world just makes sense, lol. Also all the overhead with classes and destructors and constructors and stuff ... I just wanna get from A to B but not via C++! Really great work to the coders who've written routines to bring some level of OOP to PB to make their personal coding more comfortable for them, but with all due respect i'll stick to purely procedural PB thanks, as it's just what makes the most sense to my head and allows for the smoothest coding. Each to their own of course!TI-994A wrote:In a nutshell, abstraction is the boon and bane of OOP.
It is already present far ago, I just like to see it usable and practical, not like some interfaces with VTables (which is even worst and more dirty than C style, using only function pointers/prototypes and structures. Currently I'm using that C style in my stuff if need some OOP, but "class module" concept would be really much better to be supported by compiler).Shield wrote:So you basically want OOP support for PB...*facepalm (?)*
Code: Select all
class printer{
function start(){
this->print_document_from_RAM();
}
}
class scanner{
function start(){
this->copy_image_from_scanner_to_RAM();
}
}
class copier extends scanner, printer{
//now here goes the important bit (made up keyword and syntax)
inherit scanner->start() as this->scanner_start();
inherit printer->start() as this->printer_start();
function start(){
this->scanner_start();
this->printer_start();
}
}
The code of those languages becomes ugly because they are forcing OOP usage everywhere, and in most cases this really makes code extremely ugly and unclear. Why the **ck some damn temp string must be used as a separated class? Or why I should declare another damn class just to have entry point to my program? What idiot ever wished to make his life so much more complex on level ground? Because of some Strousasshole proclaimed so, to allow army of "professional" codemonkeys not to shoot off their legs trying to produce something in C?Shield wrote:Sure, but what I don't get is why you're saying all modern languages are "ugly" because they are
using class based object orientation while at the same time wishing these features for PB.
That doesn't solve the problem. Consider the classes Animal, Rabbit, Antelope, and Jackrabbit,Derren wrote:The triangle problem could be easily resolved by using something like this.
Code: Select all
Jackrabbit jackrabbit = new Jackrabbit();
Animal animal = jackrabbit;
animal.eat(); // Which eat should be called, the one from Rabbit or the one from Antelope?
Surely, and I've mentioned it already -- because most of coders are true codemonkeys, having no ability to write something more complex than helloworld without shooting off their legs. It is of course too dangerous to gather 20-30 such monkeys into single team and give them C (also paying lot of money) ^^ In such cases even if there are a good coders in team, they can't do anything, because monkey will come and break it all. That is a reason of OOP birth.Shield wrote: There is a good reason why not all software is written in C.