What OOP code can do that procedural code can't ? - page 5

 
Mrluck07:

In your example, when you code OO and click compile, it will generate machine code. But this machine code is procedural or not? I really don't know the answer, someone here does? If machine code is procedural, then you can call OO only a higher level language, that makes easier to code only, but nothing special, so  a skilled C programmer can do the same job that a OO programmer, in fact, it can be even better optimized. So my question, ex code is prodedural or not?


You are not a programmer so better talk about the things you know
 
Amir Yacoby:
You are not a programmer so better talk about the things you know
I'm not a programmer, but i can code my EA's that's what matters to me, i've made some researches, i see people using C code emulating inheritance using structures, correct me if i'm wrong, Ex code is generated when you compile mq file, but this code will go to CPU, but your CPU will read it in a procedural way or a OO way?
 
Mrluck07:
I'm not a programmer, but i can code my EA's that's what matters to me, i've made some researches, i see people using C code emulating inheritance using structures, correct me if i'm wrong, Ex code is generated when you compile mq file, but this code will go to CPU, but your CPU will read it in a procedural way or a OO way?
It is not oo and it can't be called procedural either (procedure is higher level than machine code, and lower then oo).

Try to code a simple 2 lines code in procedural like defining an array of int and putting random numbers in each and sum them up.
In machine code it will take you an hour(I wrote assembly in the past), in procedural it's less then 10 lines of code.
 
Amir Yacoby:
It is not oo and it can't be called procedural either (procedure is higher level than machine code, and lower then oo).

Try to code a simple 2 lines code in procedural like defining an array of int and putting random numbers in each and sum them up.
In machine code it will take you an hour(I wrote assembly in the past), in procedural it's less then 10 lines of code.

Procedural = linear

When your machine code is 010000100...  your CPU will read it in a linear way or not? I really don't know the answer, can you explain it to me? But i know that if the answer is: linear way, then it's procedural because it's linear and they are the same

 
Mrluck07:

Procedural = linear


when your machine code is 010000100...  your CPU will read it in a linear way or not? I really don't know the answer, can you explain it to me? But i know that if the answer is: linear way, then it's procedural because it's linear

You probably meant sequential. Yes, the CPU instructions are executed sequentially, as well as the procedures,  and as well as any method in the class.

 
Ex Ovo Omnia:

You probably meant sequential. Yes, the CPU instructions are executed sequentially, as well as the procedures,  and as well as any method in the class.

Great, thanks for answer, so the answer to this topic - in my opinion - is: nothing.

Also i can code procedural using include files calling functions, that's called modular programming, i don't know why that's not OO, for me it's the same thing
 
Mrluck07:

Great, thanks for answer, so the answer to this topic - in my opinion - is: nothing.

Also i can code procedural using include files calling functions, that's called modular programming, i don't know why that's not OO, for me it's the same thing

OK, no problem, but if you believe that sequential means procedural, then I have to say no.

 

Off topic discussion needs to be stopped. Thanks.

EDIT: If you want philosophical programming discussion, please create your own topic in General section of the forum.

Reason: