Development Cost of Procedural Programming vs. OOP?

后端 未结 9 2243
面向向阳花
面向向阳花 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 01:45

    i think S.Lott was referring to the "unrepeatable experiment" phenomenon, i.e. you cannot write application X procedurally then rewind time and write it OO to see what the difference is.

    you could write the same app twice two different ways, but

    • you would learn something about the app doing it the first way that would help you in the second way, and
    • you may be better at OO than at procedural, or vice-versa, depending on your experience and the nature of the application and the tools chosen

    so there really is no direct basis for comparison

    empirical studies are likewise useless, for similar reasons - different applications, different teams, etc.

    paradigm shifts are difficult, and a small percentage of programmers may never make the transition

    if you are free to develop your way, then the solution is simple: develop things your way, and when your co-workers notice that you are coding circles around them and your code doesn't break nearly as often etc. and they ask you how you do it, then teach them OOP (along with TDD and any other good practices you may use)

    if not, well, it might be time to polish the resume... ;-)

提交回复
热议问题