4 Replies - 847 Views - Last Post: 16 June 2011 - 06:10 AM

#1 Ace26  Icon User is offline

  • D.I.C Head

Reputation: 40
  • View blog
  • Posts: 183
  • Joined: 10-August 08

Refute or Corroborate

Posted 15 June 2011 - 05:29 AM

The following below are some of my thoughts/opinions on programming paradigms. I'd like to hear your opinions on each of them. Here they are:

  • OOP is more human-orientented than machine-oriented. OOP is targeted at programmers(humans) to aid them in the better representation and understanding of the concept and structure of their programs and also better organisation of the same.

    I don't think it improves the efficiency and performance of programs during execution.

    Refute or Corroborate.


  • OOP is the best paradigm out there for the proper organisation of programs/code.

    Refute or Corroborate.


  • Programming paradigms don't improve performance and efficiency of programs during execution.

    Refute or Corroborate.

This post has been edited by Ace26: 15 June 2011 - 05:34 AM


Is This A Good Question/Topic? 0
  • +

Replies To: Refute or Corroborate

#2 ishkabible  Icon User is offline

  • spelling expret
  • member icon




Reputation: 1622
  • View blog
  • Posts: 5,709
  • Joined: 03-August 09

Re: Refute or Corroborate

Posted 15 June 2011 - 06:30 PM

1) refute, what's "human-orientented" is highly subjective. i bet Raynes would find that functional programing would be more intuitive becuase he is a functional programer. i prefer OOP though, it's just subjective
2) refute, there is nothing inherently better about OOP if you ask me.
3) Corroborate, there is nothing inherently better about any paradigm. each has it's own strings. if you wanted to make a state machine then you wouldn't choose Haskell(a pure functional language), if you wanted to do some stuff with AI you may very well choose Prolog, a logic based language.

This post has been edited by ishkabible: 15 June 2011 - 06:31 PM

Was This Post Helpful? 0
  • +
  • -

#3 Raynes  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 611
  • View blog
  • Posts: 2,815
  • Joined: 05-January 09

Re: Refute or Corroborate

Posted 15 June 2011 - 10:25 PM

View PostAce26, on 15 June 2011 - 01:29 PM, said:

The following below are some of my thoughts/opinions on programming paradigms. I'd like to hear your opinions on each of them. Here they are:

  • OOP is more human-orientented than machine-oriented. OOP is targeted at programmers(humans) to aid them in the better representation and understanding of the concept and structure of their programs and also better organisation of the same.

    I don't think it improves the efficiency and performance of programs during execution.

    Refute or Corroborate.


  • OOP is the best paradigm out there for the proper organisation of programs/code.

    Refute or Corroborate.


  • Programming paradigms don't improve performance and efficiency of programs during execution.

    Refute or Corroborate.


I'll refute number 1. I've read interviews from the guy who coined the term 'object oriented programming', and what he had to say is that Object Oriented programming was created to model the real world. This is what it is designed and best for.

I'll refuse number 2. Go ask 5 object oriented programmers what they think the best and 'proper' way to organize code is. Now, go ask 5 functional programmers. Compare your results. Give me an objective definition of what the 'proper' way to organize code is, and I'll probably laugh. Object orientation gives you explicit and (most of the time) forced encapsulation. I organize my Clojure code similarly to how good OOP programmers organize their code because good code is good code, and paradigms have nothing to do with it. You'd put dog stuff in the Dog class, I'd put dog stuff in the dog namespace. You don't need OOP to organize your code properly, you just need to have a brain.

I'll also refute number 3. That is not necessarily true. The paradigm has everything to do with how you write your code, and when there are many ways to write the same functionality, there is a fastest way and a slowest way. Your paradigm may give you motivation to write it the slower way. If something is faster in a functional style, knowledgeable users of OOP languages may use the functional way. Sometimes, procedural and mutable algorithms are faster and we need speed, so us functional programmers may write the procedural algorithm for the sole purpose of getting speed.


Stop thinking in terms of which paradigm is better and start thinking in terms of which paradigm is better for what. Object orientation was designed for modeling the real world, so this is what it is best for. As a side effect, organization falls into place naturally. That doesn't mean that OOP gives you better ways to organize code -- you can do it just the same in a functional language, with more flexibility in a lot of cases.
Was This Post Helpful? 1
  • +
  • -

#4 Ace26  Icon User is offline

  • D.I.C Head

Reputation: 40
  • View blog
  • Posts: 183
  • Joined: 10-August 08

Re: Refute or Corroborate

Posted 16 June 2011 - 01:42 AM

View PostRaynes, on 16 June 2011 - 07:25 AM, said:

I'll refute number 1. I've read interviews from the guy who coined the term 'object oriented programming', and what he had to say is that Object Oriented programming was created to model the real world. This is what it is designed and best for.

Is that modeling of "the real world" targeted at the compiler or the human(programmer)? What does your compiler know about "the real world" model other than bytes of bits? It's the human (programmer et al) who needs to model the real world in his program to aid his understanding and representation of concepts in code. OOP helps the programmer represent his thoughts and logic in more understandable terms closer to him than in certain obscure (esoteric) representations like in Assembly, Machine Language e.t.c

Hence,the conclusion that OOP is more human-oriented.
Was This Post Helpful? 0
  • +
  • -

#5 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10645
  • View blog
  • Posts: 39,535
  • Joined: 27-December 08

Re: Refute or Corroborate

Posted 16 June 2011 - 06:10 AM

The whole point of programming is to make things more human oriented. I'm not sure anybody on DIC can write programs in binary. There aren't that many Assembly regulars on DIC. As you go towards the more mainstream languages, the tendency is that they are easier to work with.

Quote

I don't think it improves the efficiency and performance of programs during execution.

The cost is in writing the program in a higher level language, not the paradigm. Languages like Java, which are VM based, used to have a more significant performance lag due to the bytecode being interpreted at runtime. This extra lag is negligible today, and is usually a constant. So if a program runs in O(n) time in Assembly, and you rewrite it in Java, there may be a small +k when translating the logic, which is dropped when evaluating the Big-O. Talk about performance and efficiency in terms of Big-O. Run statistics and benchmarks to (in)validate your opinion.

Quote

OOP is the best paradigm out there for the proper organisation of programs/code.

A functional programmer is going to disagree with you here. Have you also heard of event-driven programming, concurrent programming, etc? These are all programming paradigms, and each has a different use, if only slightly. Not to be rude, but you're throwing out statements, and it seems you haven't considered them enough to support them to any real extent. Check out the Wikipedia page on programming paradigms and do some research on the various ones listed there. OOP is a good paradigm that has its uses. There are others that also have uses.

Quote

Programming paradigms don't improve performance and efficiency of programs during execution.

I would like to hear your thoughts and any evidence you may have one way or the other.

This idea that one _ is better than all other _ isn't one programmers should be adopting. Programmers have tools in their toolboxes, be them languages, paradigms, design patterns, data structures and algorithms, etc. It's all about the right tool for the right job.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1