Interesting take on the PLO - page 6

 
Mikhail Mishanin:

It seems that everyone reads between the lines and everyone has something different) Where OOP is more convenient, I use OOP, where I need to save memory and time, and code for myself - I stay in procedural. Just came across an article, I wanted to hear an opinion, where / what is better). Result - heard all sorts of things in his address, not about programming) Everything as usual.

I don't know, I've never been good at making an impression, it's not my thing.

I think your article was discussed at least once on this resource last year, the threadQuestions on OOP in MQL5. If I'm not mistaken, one of the admins expressed his opinion in the same thread

the author of the article ... This article pops up on all thematic resources from time to time - the purpose is not to find out who is better/worse, but banal populism and maybe the citation ratings?


As for the essence of the article - it does not exist, go to the forum on mathematics and open a topic "why do we need sin if cos is enough" - there will be no point in the proposed discussion, it will be a usual user forums that want to kill time, and more active will be those who have the worst performance in mathematical disciplines

in principle, everything is clear from the article, at your request, without mentioning your address ))))

Mikhail Mishanin:

A, B, and C with predetermined parameters- as a phenotype for genetic algorithms?

This is exactly how the first variants of tests worked - we take the GA of a tester and select the optimal combinations of order parameters

now I look at it from another angle - genetic expression programming

 
TheXpert:

As a partial measure to improve code quality, you may suggest following some common coding style (e.g. google codestyle)

I don't want to spoil the author's karma and it is not interesting to discuss his code, but I'd like to know your opinion

this code from the articlehttps://www.mql5.com/ru/articles/8988

//+------------------------------------------------------------------+
//| Возвращает описание целочисленного свойства символа              |
//+------------------------------------------------------------------+
string CSymbol::GetPropertyDescription(ENUM_SYMBOL_PROP_INTEGER property)
  {
   return
     (
      property==SYMBOL_PROP_STATUS              ?  CMessage::Text(MSG_ORD_STATUS)+
         (!this.SupportProperty(property) ?  ": "+CMessage::Text(MSG_LIB_PROP_NOT_SUPPORTED) :
          ": "+this.GetStatusDescription()
         )  :
      property==SYMBOL_PROP_INDEX_MW            ?  CMessage::Text(MSG_SYM_PROP_INDEX)+
         (!this.SupportProperty(property) ?  ": "+CMessage::Text(MSG_LIB_PROP_NOT_SUPPORTED) :
          ": "+(string)this.GetProperty(property)
         )  :

is it a style or secret "mantra" or is it just banal spaghetti code?

i haven't seen it anywhere, i've studied half of the github, i only see it on this resource

 
Igor Makanu:

I don't want to spoil the author's karma and it's not interesting to discuss his code, but I'd like to know your opinion

this code from the articlehttps://www.mql5.com/ru/articles/8988

is it a certain style or secret "mantra" or is it a banal spaghetti code?

I haven't seen it anywhere, I've studied half of the GitHub, and it's only on this site that I can spot it.

How else can you write it?

To me, it's unreadable without knowing the insides.

 
Igor Makanu:

I don't want to spoil the author's karma and it's not interesting to discuss his code, but I'd like to know your opinion

this code from the articlehttps://www.mql5.com/ru/articles/8988

is it a certain style or secret "mantra" or is it a banal spaghetti code?

I haven't seen it anywhere, I've studied half of the GitHub, and it's only on this site that I can see it.

what exactly is wrong with it? Sometimes they add condition statements like || &&

 
Igor Makanu:

is it some kind of style or secret 'mantra' or is it a corny spaghetti code?

it is not spaghetti code in the classical sense, but it raises questions about both the design and the content
 
Igor Makanu:


I haven't seen it anywhere, I've studied half of the GitHub, I only see it on this resource

ask why they repeat in the comments what the code does ...:-)

 
Maxim Kuznetsov:

also ask why they repeat in the comments what the code does ...:-)

for others)))

 
Valeriy Yastremskiy:

for others)))

all come out of the shadows !

 
Valeriy Yastremskiy:

Is there any other way to write it?

string CSymbol::GetPropertyDescription(ENUM_SYMBOL_PROP_INTEGER property)
{
if(property==SYMBOL_PROP_STATUS)   return(FuncA(x,y,z));
if(property==SYMBOL_PROP_INDEX_MW) return(FuncB(x,y,z));

I write it that way if the endless if-else check starts

imho, it's readable, it can be corrected in any line - you can unpin/debug, you can comment it out for me, the code above... i don't know how to read it, how to modify it, how ... only questions, what does it give me - at most don't write if-else ?

 
Igor Makanu:

This is how I write if an endless if-else check starts

imho, it's readable, it can be corrected on any line - you can unpin/debug, you can comment it out I'm comfortable with, code above... i don't know how to read it, how to modify it, how ... only questions, what does it give - at most don't write if-else ?

yes, that makes more sense to me too. and shorter)

Reason: