Development Cost of Procedural Programming vs. OOP?

后端 未结 9 2127
面向向阳花
面向向阳花 2021-02-06 01:21

I come from a fairly strong OO background, the benefits of OOD & OOP are second nature to me, but recently I\'ve found myself in a development shop tied to a procedural prog

相关标签:
9条回答
  • 2021-02-06 02:05

    OO or procedural offer to different way to develop and both can be costly if badly managed.

    If we suppose that the works are done by the best person in both case, I think the result might be equal in term of cost.

    I believe the cost difference will be on how you will be the maintenance phase where you will need to add features and modify current features. Procedural project are harder to have automatic testing, are less subject to be able to expand without affecting other part and is more harder to understand the concept part by part (because cohesive part aren't grouped together necessary).

    So, I think, the OO cost will be lower in the long run compared to Procedural.

    0 讨论(0)
  • 2021-02-06 02:09

    Most all of these questions are confounded by the problem that individual programmer productivity varies by an order of magnitude or more; if you happen to have an OO programmer who is one of the gruop at productivity x, and a "procedural" programmer who is a 10x programmer, the procedural programmer is liable to win even if OO is faster in some sense.

    There's also the problem that coding productivity is usually only 10-20 percent of the total effort in a realistic project, so higher productivity doesn't have much impact; even that hypothetical 10x programmer, or an infinitely fast programmer, can't cut the overall effort by more that 10-20 percent.

    You might have a look at Fred Brooks' paper "No Silver Bullet".

    0 讨论(0)
  • 2021-02-06 02:09

    I doubt you will find a definitive study. As several people have mentioned this is not a reproducible experiment. You will find anecdotal evidence, a lot of it. Some people may find some statistical studies, but I would examine them carefully. I am not aware of any really good ones.

    I also will make another point, there is no such thing as purely object oriented or purely procedural in the real world. Many if not most object methods are written with procedural code. At the same time many procedural programs use OO methodologies such as encapsulation (also call abstraction by some).

    Don't get me wrong, OO and procedural programs look and are different, but it is a matter of dark gray vs light gray instead of black and white.

    0 讨论(0)
提交回复
热议问题