Is MQL compiled or interpreted? - page 3

 
Stanislav Korotky:

This depends from use case. If it's not HFT or some kind of deep learning/data mining - scripting language can fit as well.

Well of course, but making a trading platform like MT has to take all cases in consideration. It is not the same as a trader sitting at home and says to himself: "I can be ok with a java script for what I need". 

It has to give the maximum in order to be competitive.
 
Stanislav Korotky:

You can find some posts about compilation on the Russian forum, for example this one.

Interesting thread. Well, that seals it for me. I am convinced.

 
Amir Yacoby:
An interpreter usually executes the program. It does not create a file. This is done by compilers. 

For sake of argument, if I were to create my own language I could roll a proprietary editor with a "compile button" that ran a linting algo on the source, compile it to byte-code once there are no linting errors, and package in the original source.  Not saying that's the case, but it is possible to catch "compilation errors" on an interpreted language. 

 

When reply please mention if you are talking about MT4 or MT5 specific.

I am talking both.

I don't know how the mt4 (prev some build compiled) executables could be decompiled to *source* code. I have not used this decompiler, nor seen any output generated myself of it. I have only seen sources posted here with the numbered variables.

Back in the MS-DOS era, i played with decompilers, and programmed PASCAL. It was not possible to decompile a PASCAL source compiled executable back to the source code. Decompiled, it was generated as machine code ASSEMBLER. 

Translating run-time errors of the executable to exact line or char no. does makes you wonder.

For the record, i could not care less whether it is or isn't compiled. I did not test the examples posted.

 
Anthony Garot:

Interesting thread. Well, that seals it for me. I am convinced.

Fascinating... I'm curious to know how the original source is compiled into the ex5 in order to provide run-time debugging... 

 
nicholi shen:

Fascinating... I'm curious now to know how the original source is compiled into the ex5 in order to provide run-time debugging... 

There is a difference in normal compiled vs debug compiled.

 
Enrique Dangeroux:

There is a difference in normal compiled vs debug compiled.

So then all MQL programs are debug compiled, yes? And this would explain how the exact line and char are known to the terminal?

 
nicholi shen:

So then all MQL programs are debug compiled, yes?

If from editor you press play button, debug version is compiled (terminal makes mention of it when backtesting) if press compile, it generates normal non debug version.

 
Enrique Dangeroux:

If from editor you press play button, debug version is compiled (terminal makes mention of it) if press compile, it generates normal version.

But the question was about a "normal" compilation... how is the exact line number and char known to the terminal when the program was explicitly compiled NOT using the debugger?

 

Hmm, I don't understand how one can read from Renat's post that MQL in general is natively compiled.

He is very clear about the fact that the runtime (MetaTrader) is capable of executing old interpreted  and new natively compiled code. He is also clear about the fact native compilation is specific to the MT5-x64 version only. So, MQL4 and MQL5 in MT5-x32 is still interpreted code, as it always was since MQL2. Just look at the speeds. Can it be more clear?