Author Topic: The benefits of OOP  (Read 7363 times)

0 Members and 1 Guest are viewing this topic.

Offline tloz128

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 324
  • Rating: +58/-6
  • I feel asleep.
    • View Profile
Re: The benefits of OOP
« Reply #15 on: June 23, 2011, 07:31:18 pm »
I'm not asking whether procedural programming or OOP is better, I'm asking what the benefits of OOP are over procedural programming. Procedural methods aren't perfect. For example, networking in most procedural languages is a PITA because of all the things you have to deal with. There are languages that make networking relatively easy though, like Java. I think tloz128 brought up a good point with the part about working with other programmers. It's much easier to just pass arguments than read the documentation for that routine.
Our robotics team wrote all of its code in C++, and we focused a lot on abstraction. It saved us hours of work and made quick modifications a breeze.
Naaa... Na Nah Na Nana Na Nah... Hey Jude!

Ashbad

  • Guest
Re: The benefits of OOP
« Reply #16 on: June 23, 2011, 09:30:35 pm »
I'm not asking whether procedural programming or OOP is better, I'm asking what the benefits of OOP are over procedural programming. Procedural methods aren't perfect. For example, networking in most procedural languages is a PITA because of all the things you have to deal with. There are languages that make networking relatively easy though, like Java. I think tloz128 brought up a good point with the part about working with other programmers. It's much easier to just pass arguments than read the documentation for that routine.
Our robotics team wrote all of its code in C++, and we focused a lot on abstraction. It saved us hours of work and made quick modifications a breeze.

Same as our team, but we used Java.  It would be a lot harder to access certain things such as solenoids and their functions and modify their states, and even harder to fix on the fly.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: The benefits of OOP
« Reply #17 on: June 24, 2011, 07:43:28 am »
OOP has many advantages, it makes it easier to define and change objects during code. Let's say I am making a game with a spaceship and I have an object for the Spaceship (a class Spaceship). I just need to do SpaceShip.getDamageLevel(); to get the damage and see if the user lost. Of course all this has to be define first inside the class but it makes programming in larger projects much easier.