Dear Stringo,
many thanks for your rapid reply!
I can understand that you might not support this in the first version of the language, but I do not understand your resolute "not planned in the future" though.
Overloading of methods is possible (and should be, as otherwise there would not be much merit in calling MQL5 object-oriented),
but why then is overloading of constructors prohibited?
Through this decision orthogonality in MQL5 is sacrificed, whereas especially in language design orthogonality is to strive for!
Here's hoping that the MQL5-Team will still reconsider a number of object-oriented idiosyncrasies for future versions.
Cheers!
- www.mql5.com
I couldn't agree more Plymo,
Overloading of constructors is heavily used in OO development. I hope in a future release it gets put in.
EDIT: Correction: You can overload constructors as well as long as you you a parameterless constructur.
Cheers
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hmmm, MQL5 does not allow constructors to carry parameters.
Normally, OO-Languages offer multiple types of constructors (with different parameter lists) to be used, in order to (partially) initialize a new object with user-provided values.
IMHO this is a serious omission and a feature that really should be considered for future versions of MQL5!
Cheers!