Re: I am not sure any more...

@18: basic question, what do you call a good code?
If you understand under this term a code which will do its job, then yes, you are true. All programs are in the final phase translated to  machine code, where processor doesn't know anything about oop, but will do its job.
if you are talking about readable and extendable code, then nope, this really can't be achieved without oop. Sooner or later you will face spaghetti code and global variables, what is beginning of the end and your source code will die, sooner or later.

Multiple inheritance is controversial theme, because it causes some philosophical problems and also some practical.
Interfaces are better solution for this. bit harder theme in python, but can be achieved, however it is true that it's not that widely used and beginners can ignore it.
But not the inheritance. It has some critical methods which you need to know, otherwise you can be very surprised at some point.
For example, how to override Equals method or GetHashCode, which are important when you want to compare your objects in different way than using their references.
Also objects copying is standardized in Python and requires inheriting certain methods to work. this isn't case of C++, which copies objects automatically, but in Python, C#, Dart and all other managed languages which I know excepting BGT, you must do this yourself.

Also it isn't a big surprise to me that oop has later chapters in a C++ book. For example, on itnetwork, tutorials are normally divided to basics of certain language, object oriented programming, work with files, multithreading etc. OOP goes immediately after basics. If we count lessons, it is somewhere in 14th place, with things like variables, conditions, functions, arrays, multidimensional arrays etc. before.
Then goes oop with all its principles. The most important encapsulation, then the rest of principles and other important things.
But in case of C++, there is one more tutorial between basics and oop, called Advanced constructions of C++. it has 17 chapters targeted to advanced memory management. That's it, in C++, there are lot of things you need to know before you can dive into oop, so it makes sense it is in higher chapters.
I think in a book about a managed language, situation would be bit different.

Best regards

Rastislav

-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Origine via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : ironcross32 via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Amit via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector

Reply via email to