The Artima Developer Community
Sponsored Link

Heron-Centric: Ruminations of a Language Designer
The Myth of Paradigms and TMTOWTDI
by Christopher Diggins
September 12, 2006
Summary
Are there really separate programming paradigms? I don't believe so.

Advertisement

There are two big schisms in the programming community: one along dynamic versus static type checking and another along functional and procedural programming styles. I believe that there is no real difference between these so-called paradigms, and they are just different, but limited ways, at looking at the complete space of programming problems.

No single approach is sufficient.

The big reason for the functional/procedural schism is the fact that computers are in fact machines that do separate yet very important things:

  1. perform actions
  2. perform computations
Consider that when you want certain kinds of computations performed, functional programming is often the correct way to do things. When you want to write a controller for an assembly line robot then then procedural programming is usually the best approach.

The other split, dynamic vs static typing, is also artificial. Static typing is undeniably useful for verifying a program's correctness and for improving speed, while dynamic typing is very useful for writing and modifying code quickly and writing programs which are adaptable.

This leads to a separate but intriguing question: why aren't true multi-paradigm languages like Scala and OCaml more popular? I propose that the fundamental problem of being a multi-paradigm language is that there is no clear correct way to do things. They suffer from the challenges of TMTOWTDI (There's More Than One Way To Do It). This may remind you of another reasonably succesful language, Perl, which suffers from severe marginalization. It is a truly multi-paradigm language, which is only used in a specific niche.

What I dislike about TMTOWTDI is the difficulty it brings to mastering a language. If you code intelligently, yet naively, in any of these languages and share it with the communities, you are conforonted with waves of criticism for not following large sets of unwritten rules about how to do things correctly.

The fundamental problem with multi-paradigm languages is that there is often an agreed upon best way to do certain things based on flexibility and performance, which isn't often written down. Why should a language even provide a programmer with alternatives if they aren't good? It just confuses them, and is more likely lead to poorly written code.

Well then what's the answer? These issues seem to be add odds with each other. I don't know the answer. Perhaps mixed language code? Perhaps some unwritten language could unify everything elegantly.

Talk Back!

Have an opinion? Readers have already posted 62 comments about this weblog entry. Why not add yours?

RSS Feed

If you'd like to be notified whenever Christopher Diggins adds a new entry to his weblog, subscribe to his RSS feed.

About the Blogger

Christopher Diggins is a software developer and freelance writer. Christopher loves programming, but is eternally frustrated by the shortcomings of modern programming languages. As would any reasonable person in his shoes, he decided to quit his day job to write his own ( www.heron-language.com ). Christopher is the co-author of the C++ Cookbook from O'Reilly. Christopher can be reached through his home page at www.cdiggins.com.

This weblog entry is Copyright © 2006 Christopher Diggins. All rights reserved.

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use