Vim as ide for mql - page 7

 
Maxim Kuznetsov:

if i understand correctly, we still should use guard`s and there are some special code requirements ?

In our own header files yes, we need guards. We first run through the hose, it makes a big mess of all the hooks and this goes to the µl compiler. Without guards, the definitions will be repeated and the µl compiler will generate errors.

From the code requirements, yes only one in principle - we pack specific μl directives of the preprocessor like this

#ifndef  VIM
mqlcpp_#import  jkjkjk.dll
#endif
void fn_from_jkjkjk_dll();

So that clang doesn't stumble on this import during analysis and compilation. If mql is a specific construct, but not a directive to the preprocessor, then without mqlcpp_ (you don't have to, but from the clang point of view this is some kind of error).

#ifndef  VIM
input int            MA_Period=13; // Ну или INPUT макрос
input int            MA_Shift=0;
#else
int            MA_Period=13;
int            MA_Shift=0;
#endif

Whether to dereference pointers with -> and whether to put & before arrays is up to choice, but following C++ style will give better support from clang.

HH: by the way, didn't tell you how "first compilation" is defined in the context of adding guards. See Include/Object.mqh and if we don't find a guard there, then compile first. I would also like to add the ability to form a blacklist for dumb thieves.
 
Vict:

...

In general, your questions are wrong, more interesting - I've made an ide in a couple of days on my knees with all the goodies and much higher quality than the meta-editor...

Yes... With capabilities like that it's easy to write an operating system in a week.) Sometimes I like to embellish, but this much...)

Maybe it's a publicly available framework, that allows you to build software at puzzle level? Well, then everyone can build his own IDE to his taste and use it.)

In a couple of days...
 

Read, read....

Tired of looking at these show-offs.

All those tricks are not necessary to a trader who is writing a trading strategy for himself.

And even more so for custom orders, as it's mostly beginners who order. There are orders of childish innocence, which are implemented in a few lines of code.

Of course, I liked the fact that python support is planned.

It is quite a useful addition.

 
Vict:

...The rest of us will continue to pray to the MC, dutifully putting ampersands in front of arrays and dereferencing via a dot.

As for the dot, it is more convenient and laconic, plus compatibility with OOP languages. On the contrary, I often thought that it would be nice to have the same feature in C++. Of course, there is a downside, but I think there are more advantages.
 
Реter Konow:
Exactly! How many variable and function names have changed that way. A bit longer than in VS, but more control.
Don't confuse regular auto-replacement of text in a file with context-sensitive replacement.

 
Alexey Navoykov:
As for the point, it is more convenient and laconic, plus compatibility with OOP languages. On the contrary, I often thought it would be nice to implement the same feature in C++. Of course, there is a downside to this, but there are more advantages, I think.

Then you'd have to throw out the smart pointers, the iterators, . . One must somehow distinguish between a function call of the pointer itself and the type being pointed.

unique_ptr<type> ptr(...);
ptr->call_referenced();
ptr.release();

A point cannot be overloaded, i.e. access to the internals is guaranteed.

Renat Akhtyamov:

And all the more so when ordering, since it is mostly beginners who order. They are orders of childish innocence, which are implemented in a few lines of code.

I do not give a damn about orders, I am writing for myself and share my knowledge with others, not for some marketeers.

 
Vict:

Then you'd have to throw out the smart pointers, the iterators, . . One must somehow distinguish between a function call of the pointer itself and the type being pointed.

A point cannot be overloaded, i.e. access to the internals is guaranteed.

Well, you can't overload -> in MQL, either. That's why the difference is out of the question.
By the way, is it possible to emulate this overloading in Vim?
 
Alexey Navoykov:
Don't confuse regular auto-substitution of text in a file with context-substitution.

And what is it for? In case variables with different contexts have the same name in the same file? Substitution by meaning, not text? Please clarify where and why it should be used. All of a sudden, everyone needs it and some don't know.

Zy. Google doesn't know about this substitution either...
 
Реter Konow:
And what is it for? In case variables with different contexts have the same name in the same file? Substitution by meaning, not text? Please explain where and why to use it. All of a sudden, everyone needs it, and some don't know.
Well, you got it right in principle.
 
Alexey Navoykov:
Well, you got it right in principle.
If you get it right, it's an arch-rival thing. ))
Reason: