Home > technical > Imperatively Dysfunctional

Imperatively Dysfunctional

I’ve been programming in the C and C++ imperative languages forever. However, it seems that functional languages like Lisp, F#, Erlang, Scheme, Haskell, etc, are generating a lot of buzz these days. Curious as to what all the fuss is about, I tuned into Rebecca Parsons’ “Functional Languages 101InfoQ video to learn more about these formerly “academic” languages.

OMG! It felt like getting a root canal without novocaine. Since I’m imperatively dysfunctional, I found her lecture to be really tough to follow. The fact that all of Rebecca’s viewgraphs were black and white text-only throwbacks to the 70’s didn’t help – not one conceptual diagram was presented.

One of Rebecca’s opening foils is shown below. As opposed to a statement, which is the fundamental unit of design in imperative languages, the pure “function” is ground zero in the functional language world. Recursion and statelessness are fundamental tenets of functional languages. Problems, even those that are naturally stateful (most real-world problems?), must be morphed into the vocabulary and semantics of functional language land.

The viewgraph below shows one of several Scheme language listings that Rebecca presented. Even after listening to her explanation of how it works, the only thing about the parentheses encoded gibberish that I grasped is that it defines the logic of three recursive functions that do something. D’oh!

In one of her last viewgraphs (see below), Ms. Parsons addressed the main reason for the rise of functional programming languages. Being a specifier/designer/developer of distributed real-time sensor systems, I’m really keen on her first bullet.

Even though watching Rebecca’s lecture didn’t enlighten me and it made my head spin, I’m going to crack open an Erlang programming book and try to learn more about the subject. Eventually, I just may “get it” and experience the “ah-ha” moment that many others seem to have experienced.

  1. miguelangel
    November 4, 2010 at 4:27 am

    LISP is mainly used for AI. A recurrent function is one that is defined in terms of itself. For example f(x) = f(x+1) and you have to provide an initial value for x in the range of x such as x= 0, 1, 2,3, 4, etc. So you must provide a value for f(o) Fingerprinting matching that you see on TV or movies is software best made with LISP. Very simple to learn & use, nearly impossible to read.

  2. November 4, 2010 at 6:09 am

    Now that you mention it Miguel, I remember the AI boom and Lisp buzz of the 80s that seemed to fizzle out. Paul Graham, a hacker and entrepreneur turned venture capitalist, loves dynamic typing and Lisp. The product of the company he founded that made him rich, Viaweb (sold to Yahoo! in 1998 for $49.6M), was written in Lisp. In his book “Hackers and Painters”, he said it gave Viaweb a huge competitive advantage over their competitors. He was able to add features and fix bugs quicker.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: