Talking about the PLO in the lounge - page 18

 
Alexey Volchanskiy:

Answer the questions, clearly and without pioneering snot

1. What paralleling technology have you personally used. Not general blather, but specific names of technologies and languages.

1.1 What did your version of OOP fail at?

------------

SZZY: I was teaching OOP for more than 24 hours already, the moderator wrote that during this time he banned 10 people and deleted about 200 stupid posts! Says write, there are already reading you on a regular basis 40-50 people at a time, the theme is necessary. Need to make a menu - I'll help at any time.

Verilog
 
George Merts:

The OOP approach-is needed by man to simplify the development, and more importantly, the support of the system.

"The problem with OO languages is that they pull on their whole environment. All you wanted was a banana, but you end up with a gorilla holding that banana and the whole jungle along with it."

Прощай, объектно-ориентированное программирование
Прощай, объектно-ориентированное программирование
  • 2005.08.16
  • habrahabr.ru
Я в течение десятилетий программировал на объектно-ориентированных языках. Первым из них стал С++, затем был Smalltalk, и наконец .NET и Java. Я фанатично использовал преимущества наследования, инкапсуляции и полиморфизма, этих трёх столпов парадигмы объектно-ориентированного программирования. Мне очень хотелось воспользоваться обещанным...
 
Andrei:

"The problem with OO languages is that they pull on their whole environment. All you wanted was a banana, but you end up with a gorilla holding that banana and the whole jungle along with it."

That's right. That's a good analogy!

But is it a problem ? On the contrary, it's an advantage of OOP !

Because there is no such thing as "just a banana". To a banana - you need a palm tree, to a palm tree - you need a nutrient medium, and by the way, a gorilla that will climb on that palm tree and get that banana.

In my opinion, and it's great that you don't think about any of this, but take this very banana, and eat it.

P.S.

I read the article - it says everything right, but just all these arguments convince me - OOP is a great technology, much better than FP. It's just that while using it we have to follow some rules, which we shouldn't have followed in FP. But that's no reason at all to reject OOP. In my opinion, all arguments in the article are on the contrary proving the advantage of OOP, they just warn that "when using a knife, be careful".

By using electrical appliances instead of mechanical ones - you are also following some rules, which were not required before - it's true. But that's no reason to give up electrical appliances !

 

The conversation reminds me of a sketch from a soap opera (speaking of broads, hello, Wolchansky).

-------------------------------------

The ex-wife calls the ex-husband for a meeting:

BJ: Can you imagine, our daughter is pregnant ! And she is only 19, she has to study, go to college !!!

BM: What are you talking about?!!!! Who is she pregnant with ?

Why no one knows ? I don't know... Oh what will happen, what will happen...

BM: This scoundrel is hiding and won't acknowledge the child ?

ROB: No, he is not hiding away and just imagine, our daughter is going to marry him !!! What are we gonna do, she's just out of high school !!!!

BM: .... ???

Bj: Why are you silent, why are you silent?!!! Don't you understand ?!!! Our daughter is pregnant !!! and she's getting married !!! understand ?!!!

BM: Um... I see... But... I don't see the problem here... You got pregnant and married me when you were 18, had her... And there's nothing wrong with that...

-------------------------------------

That's the way it is here - I'm being proved huge shortcomings and problems of the GOP that I absentmindedly don't consider problems, many on the contrary, consider virtues...

How would you get to that point of enlightenment where you can see that being careful with a knife is the downside of OOP outweighs the pros ?

 

This is one of the reasons for the demographic situation in "developed" countries - first you graduate, then you arrange your life, pay the mortgage... and then you are not interested in children, as long as nobody touches you

 
George Merts:

Because 'just a banana' doesn't happen. A banana needs a palm tree, a palm tree needs a nutrient medium, and by the way, a gorilla that climbs up that palm tree and gets that banana.

In my opinion, and it's great that you don't think about any of this, but take this very banana, and eat it.

No, that's not the point. There is a banana to be eaten according to the logic of the programme, but you have to eat the palm and the black earth with manure together with it.

 
Andrei:

"The problem with OO languages is that they pull on their whole environment. All you wanted was a banana, but you end up with a gorilla holding that banana and the whole jungle with it."

The article lies!

As far as the owner of the base class is concerned, it works as intended. And it passes all the autotests. But the owner does not pay attention to the derived class. And the owner of the derived class is greatly disappointed. Now ArrayCount addAll() calls the parent addAll(), which internally calls add(), which control has already been overridden by the derived class. As a result, the counter is incremented each time add() of the derived class is called, and then is incremented again by the number of elements added by addAll() of the derived class.ITS, ELEMENTS ARE COLLECTED TWO TIMES.

When I read that statement, I got very hesitant. Rolled quickly to check my head wasn't messed up:

class ArrayList
{
public:
  void add( int )
  {
    Print(__FUNCSIG__);
  }  
};

class Array
{
private:
  ArrayList a;

public:      
  void add( int element )
  {
    Print(__FUNCSIG__);
    this.a.add(element);
  }
 
  void addAll( const int &elements[] )
  {
    for (int i = 0; i < ArraySize(elements); i++)
//      this.a.add(elements[i]);
      add(elements[i]);
  }
};

class ArrayCount : public Array
{
public:
  int count;

  ArrayCount() : count(0)
  {
  }

  void add( int element )
  {
    Array::add(element);
    
    ++this.count;
  }
    
  void addAll( const int &elements[] )
  {
    Array::addAll(elements);
    count += ArraySize(elements);
  }
};

void OnStart()
{  
  int Tmp[5];
 
  ArrayCount Count;
 
  Count.addAll(Tmp);
  Print(Count.count);
}

I highlighted the lines that the author of the article suggests changing. The result is not affected by replacing them. I did not read the rest of the article. The author's nonsense was probably pointed out in the comments.

Прощай, объектно-ориентированное программирование
Прощай, объектно-ориентированное программирование
  • 2005.08.16
  • habrahabr.ru
Я в течение десятилетий программировал на объектно-ориентированных языках. Первым из них стал С++, затем был Smalltalk, и наконец .NET и Java. Я фанатично использовал преимущества наследования, инкапсуляции и полиморфизма, этих трёх столпов парадигмы объектно-ориентированного программирования. Мне очень хотелось воспользоваться обещанным...
 
George Merts:

That's right. Good analogy !

But is it a problem ? On the contrary, it's an advantage of OOP !

What is torment for normal people is joy for masochists... :)

 
fxsaber:

The article lies!

What difference does it make?

You need to argue your claim (OOP sucks) - google "OOP" and a couple of negative qualities, get a better article, and without reading it, post it on the forum.

True or not true - doesn't matter. It doesn't matter if it's true or not. If there are attentive people like you who will bother to read it and check it, you can throw another article in the same way.

 
Я — функциональщик. Прекрасно себя чувствую. Это ты от ООП такой раздражительный.
Reason: