
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
To the compilers, a suggestion.
Please make transfer of small structures by value, not only by reference. Because all complex/rational arithmetic is terribly slow.
Please explain how passing by reference instead of structure value transmission can slow down? Best of all with an example.
As soon as we allow passing structures by value, the real braking begins. Developers will unknowingly use passing of huge structures through the stack everywhere and their programs will be slowed down.
Multiple inheritance is definitely evil.
Ы? How do you inherit two interfaces?
I'm all for merging with sharps rather than pluses. It makes a lot more sense there, given the generations of experience.
A request to compilers.
Please make transfer of small structures by value, not only by reference, because all complex/rational arithmetic is terribly slow.
Simply set a limit (at your discretion - 32 or 64 bytes) after which the compiler does not pass structure passed by value and strictly requires passing by reference.
Also would be very nice to be able to return small structures as a function result.
--
I even vote for operator overloading. I hope I will get around to it one day. It seems that the course "to merge with C++" is taken and generally supported.
Functional syntax for arithmetic operations with non-standard mathematical objects is very inconvenient, and also slows down a lot,
because it cannot be replaced by inline substitutions and requires the expenditure of function calls.
No. Structures by reference only. No exceptions. Give us some figures for the brakes so that we can estimate the scale of the catastrophe.
We used to have an option to return structures as a function result. Eventually we overrode this option due to ambiguity of implementation (our internal debugging). We decided that since structures are passed by reference, pass the resulting structure as a parameter.
Overloading of operators is possible. But not now.
Developers: please make OnTimer() work in indicators which are not attached to chart.
1. no. structures only by reference. No exceptions. For brakes, give figures, so we can estimate the scale of disaster.
2. We used to have an option to return structures as a function result. Eventually we overrode this option due to ambiguity of implementation (our internal squabbles). We decided that since structures are passed by reference, pass the resulting structure as a parameter.
3. overloading of operators is possible. But not now.
1. :) Catastrophe is cancelled. I've measured it and was very surprised, the brakes are not in it (the script is in the trailer). I'll search myself and optimize. But syntax in many cases is more convenient, when you can substitute expressions in the parameters. Yeah. Well, I can live with this. It's bearable. The main thing is that it doesn't slow down.
2) Can we reassign structures back? Assignment of structures is perfectly legal, so let's allow it back too. The program is much more readable when the assignment of the function execution result is syntactically unified:
Y = Func(X); - it looks much clearer when reading the code briefly than Func(X, Y); // you should guess that Y is an out-parameter.
No, Straustrup would not like your solution... it's not right somehow... :)
3. Oh! That's good. Thank you for that.
Can we also reassign structures legally, so let's allow them to reassign too. The program is much more readable when assigning the result of a function is syntactically unified:
I'll tell you a secret. Just do it.
Turns out they didn't cut it off. You can return simple structures. But keep in mind that in this case you will have to add 2 extra copies - copying into the tempo structure on the stack and copying from the tempo structure into the result structure.
Why is the CExpert class from the standard library declared as such in the Documentation,
and in the Expert.mqh file we see this declaration?
Developers: please make OnTimer() work in indicators which are not attached to the chart.