reasons why programmer prefer object-oriented program?

✅ Answers

? Favorite Answer

  • I am a programmer, and I DON’T prefer object-oriented programming. I lean toward functional programming.

    To each their own

    http://blog.thlight.com/uncle-bob////Thre…

    Anyway, as Abelson says “It’s all air”. cons (construct cell) car (first of cell) cdr (second of cell) are normally considered “fundamental” with lists – first is the data, and second is a pointer to the rest of the list. But, as Abelson shows in “Structure and Interpretation of Computer Programs”, if you have first-class functions and closures:

    (define (cons x y)

    ..(lambda (m)

    ….(cond

    ……((= m ) x)

    ……((= m ) y))))

    (define (car z) (z ))

    (define (cdr z) (z ))

    works as definitions of cond, car, cdr. cons returns a function, that, if invoked with an argument of , returns the first part of the cell, and with an argument of , the second part. Indeed, you can easily add to it (say, to make triplets, etc.).

    Oh… and you notice that the function has methods? x and y are not accessible, except by calling the anonymous returned function with an argument. This is “object oriented programming”, even though it is a function that is a closure over x and y.

    Is your head hurting?

    As to the “answer”

    – data and methods are encapsulated and may be easier to reason about. Isolation helps.

    – classes can model the problem domain

  • Who said that programmers prefer object-oriented programs? Object-oriented programming is just another in a long series of programming fads, and neither helps nor hurts the profession. Good programmers know this.

    See also  Class diagram for e-voting in OOP?
  • I like procedural programming.

    I debate this often with colleagues. They claim an advantage of having useful reusable classes. I claim, I know how to write organized sub-routines and functions. To top it off I can get done with a project quicker since I spend time thinking about the best way to write code. Not the efficient way to organize OOP structure.

  • OOP is encapsulation, therefore you can locate the line of code you want to evaluate because Objects have a name grouping () values () states () behaviors.

    The objective of OOP is to have a common named method() and loop over a collection of Objects invoking one line of code — one command different behaviors across different Object types.

  • . adding data structures is much more straightforward

    . building a modular program is much easier

  • Other Related Questions

    Learning Visual Basic ?

    Answers Favorite AnswerTry using "System.Diagnostics.Process. GetProcessesByName( "iwmp" ).Length > " for your check.

    Microsoft Office word Fast answer needed its urgent?

    Answers Favorite AnswerTry this:http://www.techsupport.com///microsoft-wo...Here is another thread re: the same issue with instructions:http://www.pcreview.co.uk/forums/modification-not-...http://www.techsupport.com///microsoft-wo...http://support.microsoft.com/kb/http://answers.microsoft.com/en-us/office/forum/of...

    Can I download a whole city android google maps?

    Answers Favorite Answer:) Yes!!!Interesting question. I wonder why it has blocked in this way especially considering that Google Earth is very detailed and has good maps of Israel.

    What is meant by ROM ? Explain in simple but elaborate terms.What about mobile ROM’s?

    Answers Favorite AnswerHi Diva below is a link that will give a simple answer.http://wiki.answers.com/Q/What_does_ROM_stand_for_...Hope this helps.Source(s): Experience and wiki answers.ROM is Read only memory. i.e data can write only once.There two types of ROM..ROM.PROMThe difference between ROM and PROM.that is ROM is programmed during manufacturing it means data stored by manufacturing company.PROM is blank memory that a user programmable memory.user can store content on PROM.both ROM and PROM are Read only memory Data can write only once.and its not possible to write so many time.Memories of PROM and ROM are Non-volatile in nature. Its that stored informations can retain even power goes off.

    See also  Help with coding? Tutorials?

    Leave a Comment