2 added 36 characters in body
source | link

The problem I see in general is, that different paradigms are sometimes treated like a cargo cult and it is good to remember what we are doing and why. The case with OOP is not, that it is in and from itself better, nor is it necessary to put everything in a class to follow software craftsmanship.

The main difference between OOP and procedural is, where your data lives and where the code which deals with the data lives (without going into detail about the pillars of OOP ktl.). But the point is: someone thought it a good (or maybe a better) idea to put data and its modifying code together. That is nothing which is carved in stone for generations to come. It is just a way of thinking and working. The hope was, that the way OOP structures code:

  • code will be better organized (data alongside modifying code)

  • less error prone

  • less repetitive etc.

It was developed for a reason.

That said, it should be clear, that to achieve the above goals OOP is one but perhaps not the only way.

And the good thing about Python in contrast to Java is, that there are on the one hand classes and methods like Java but also are functions first class citizens. That allows to decide how to structure your code, which suits the problem you are trying to solve best.

Finally: A nice talk about to Stop writing classes

The problem I see in general is, that different paradigms are sometimes treated like a cargo cult and it is good to remember what we are doing and why. The case with OOP is not, that it is in and from itself better, nor is it necessary to put everything in a class to follow software craftsmanship.

The main difference between OOP and procedural is, where your data lives and where the code which deals with the data lives (without going into detail about the pillars of OOP ktl.). But the point is: someone thought it a good (or maybe a better) idea to put data and its modifying code together. That is nothing which is carved in stone for generations to come. It is just a way of thinking and working. The hope was, that the way OOP structures code:

  • code will be better organized

  • less error prone

  • less repetitive etc.

It was developed for a reason.

That said, it should be clear, that to achieve the above goals OOP is one but perhaps not the only way.

And the good thing about Python in contrast to Java that there are on the one hand classes and methods like Java but also are functions first class citizens. That allows to decide how to structure your code, which suits the problem you are trying to solve best.

Finally: A nice talk about to Stop writing classes

The problem I see in general is, that different paradigms are sometimes treated like a cargo cult and it is good to remember what we are doing and why. The case with OOP is not, that it is in and from itself better, nor is it necessary to put everything in a class to follow software craftsmanship.

The main difference between OOP and procedural is, where your data lives and where the code which deals with the data lives (without going into detail about the pillars of OOP ktl.). But the point is: someone thought it a good (or maybe a better) idea to put data and its modifying code together. That is nothing which is carved in stone for generations to come. It is just a way of thinking and working. The hope was, that the way OOP structures code:

  • code will be better organized (data alongside modifying code)

  • less error prone

  • less repetitive etc.

It was developed for a reason.

That said, it should be clear, that to achieve the above goals OOP is one but perhaps not the only way.

And the good thing about Python in contrast to Java is, that there are on the one hand classes and methods like Java but also are functions first class citizens. That allows to decide how to structure your code, which suits the problem you are trying to solve best.

Finally: A nice talk about to Stop writing classes

1
source | link

The problem I see in general is, that different paradigms are sometimes treated like a cargo cult and it is good to remember what we are doing and why. The case with OOP is not, that it is in and from itself better, nor is it necessary to put everything in a class to follow software craftsmanship.

The main difference between OOP and procedural is, where your data lives and where the code which deals with the data lives (without going into detail about the pillars of OOP ktl.). But the point is: someone thought it a good (or maybe a better) idea to put data and its modifying code together. That is nothing which is carved in stone for generations to come. It is just a way of thinking and working. The hope was, that the way OOP structures code:

  • code will be better organized

  • less error prone

  • less repetitive etc.

It was developed for a reason.

That said, it should be clear, that to achieve the above goals OOP is one but perhaps not the only way.

And the good thing about Python in contrast to Java that there are on the one hand classes and methods like Java but also are functions first class citizens. That allows to decide how to structure your code, which suits the problem you are trying to solve best.

Finally: A nice talk about to Stop writing classes