XOr wrote:There will never be OOP in PureBasic
Natively, maybe.
But in pre-processing (non stand-alone), the pb compiler allows it perfectly. I built it in 2018, because I love OOP (the OOP on CPP). I made a non stand-alone purebasic source code which converts a CPP source code between two directives
CompilerIf 0 and
CompilerEndIf, to a pb target code, and then pbcompiler was used a second time to compile it.
Excepted the IDE which breaks the genius, it worked fine. Metamorphism is okay. Just the target code is... huge, because all the functions are dupplicated.
It is [by] creating himself, that we know exactly the limits of a concept. OOP is magic. OOP is communicative. OOP is evolutive ("evolving" ?) but OOP cannot manage 20 objects or more, as it manages perfectly 3 objects. More there are objects, less the OOP has convenients on procedural.
This is not my opinion : this is the technical break I met.
Create a level on procedural for complex systems (i will define below) is simpler than oop.
"complex" definition = which keeps an equal relationship whatever the object. Example : the atoms, moleculs, biologic cells, living units, ideas, etc...
Example in example : If you code the characteristics of a hydrogen atom, you have all the characteristics of every natural atom, you can code easily the relationships between an hydrogen atom and an other atom, whatever the second one. But it is absolutely unable to know the behaviour of 20 different atoms together, on a single computer.
On procedural, it is unable also. But the memory size of an executable file, is not the same depending of the origin : procedural or oop. Which wins ? Procedural. So, which can simulate the bigger set of different atoms in a fixed hardwared configuration ? Procedural.
Procedural/OOP debate is like interpreter/compiler debates.
Interpreting reachs the money of the people quicker than compiling. But the money is only a tool. Discovering new concepts, needs hardware, clock cycles, fixed buffers, defined states, because more a technology is known in its totallity, more the quantity of concepts available is a number which explodes.
@threedslider
If you have a subject title which attracts, think the readers behind need to read a work of synthesis. You use an automatic translator now : maybe have you seen several characteristics in the article ?