|
|
Log in / Subscribe / Register

Quote of the week

Quote of the week

Posted Mar 24, 2011 22:08 UTC (Thu) by rwmj (subscriber, #5474)
In reply to: Quote of the week by pflugstad
Parent article: Quote of the week

OO is bad at modularity. Code is split over many objects ("nouns"), meaning you have to chase the flow of control over many classes, and in some languages that means across many files. Plus you may not know until run time whether some object overrides methods in another class, making it very hard indeed to follow the flow. Of course IDEs help in this respect, but that's just admitting that the code is hard to understand without needing a very heavyweight, slow and intrusive tool to help you.

Functional programming (in broad terms) separates data structures from code that operates on those structures. The code is in one place and follows a simple flow of control -- for example if a function is called, it's clear at compile time which function is being called.

I'm speaking from experience here. It took me a long time when learning ML and OCaml to unlearn bad OO habits, but I now consider myself a much better programmer as a result, and tend to pity people still stuck in OO paradigms (except in some very narrow cases where the OO paradigm works).

Rich.


to post comments

Quote of the week

Posted Mar 25, 2011 13:48 UTC (Fri) by scripter (subscriber, #2654) [Link]

For an introductory course in programming, I think it's wise to eliminate object oriented concepts from the dizzying array of concepts that students must learn.

As I reflect on my journey of learning to program, I started with TI 99 BASIC, PET BASIC, and GW BASIC. I transitioned to Pascal, then C. No object oriented concepts there. OO languages came later, as did Scheme.

----

Regarding professional programming, my perception is that the programming language matters far less than the tools, the instrumenting, the libraries and the people writing the code, and their ability to solve real world problems.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds