"I'm not much of a fan of
object-oriented design," Rob Pike has been telling the developer community, in
reply to a question put to him recently via Slashdot.org.
Pike, who now works for Google, Inc., said: "I'm not much of a fan of
object-oriented design," though he conceded that the future does indeed seem to
have, as he puts it, "an OO hue."
Pike then went on to offer an analogy aimed at exposing the weakness of using
only OO methodology in all cases:
"If you want to make some physical artifact, you might decide to build it
purely in wood because you like the way the grain of the wood adds to the beauty
of the object. In fact many of the most beautiful things in the world are made
of wood. But wood is not ideal for everything. No amount of beauty of the grain
can make wood conduct electricity, or support a skyscraper, or absorb huge
amounts of energy without breaking. Sometimes you need metal or plastic or
synthetic materials; more often you need a wide range of materials to build
something of lasting value. Don't let the fact that you love wood blind you to
the problems wood has as a material, or to the possibilities offered by other
materials."
"OO is great for problems where an interface applies naturally to a wide
range of types," Pike added, "not so good for managing polymorphism (the
machinations to get collections into OO languages are astounding to watch and
can be hellish to work with), and remarkably ill-suited for network computing."
"That's why I reserve the right to match the language to the problem, and
even - often - to coordinate software written in several languages towards
solving a single problem," he continued.
Pike accepted that OO design is the way people are taught to
think about computing these days: "I guess that's OK - the work does seem to get
done, after all - but I wish the view was a little broader."
Personally,
though, he reserved the right to match the language to the problem, and
even - often - to coordinate software written in several languages towards
solving a single problem.
"It's that last point - different languages
for different subproblems - that sometimes seems lost to the OO crowd," Pike
said. "In a typical working day I probably use a half dozen languages - C, C++,
Java, Python, Awk, Shell - and many more little languages you don't usually even
think of as languages - regular expressions, Makefiles, shell wildcards,
arithmetic, logic, statistics, calculus - the list goes on."
Pike agreed
that object-oriented design has much to say to Unix, "but no more than
functions or concurrency or databases or pattern matching or little languages
or..."
"Unix in all its variants has become so important as the operating
system of the Internet that whatever the Java applications and desktop dances
may lead to, Unix will still be pushing the packets around for a quite a
while," he remarked.
About Java News Desk JDJ News Desk monitors the world of Java to present IT professionals with updates on technology advances, business trends, new products and standards in the Java and i-technology space.
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS
SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
Click to Add our RSS Feeds to the Service of Your Choice: