in reply to Re: (tye)Re: How does learning C benefit a programmer?
in thread How does learning C benefit a programmer?

He doesn't mean that C isn't a functioning language. In my other comment, I originally touched on this, but decided not to as I was beginning to sound preachy, but unfortunately, you're going to have to suffer through my sermon now.

There are several main catagories of languages. you will usually hear of functional, logical, and object oriented languages on the internet. There are many other types that you will hear of in more serious practice, such as assembly and procedural.

You will not gain the benefits of learning C from learning Python or Java. They do not offer many of the things that you would learn from C, however, Java is a good intro language for object oriented programming, you might consider learning that before learning C++.

What he meant by learning a "functional" language is learning a language that enforces it's own functionality. One such langauge is LISP. It doesn't mean that your programs in LISP will function properly, but rather that they will always be experessed in terms of a function, in the mathematical sense. (+ 2 3) would be a logical line of lisp that returns 5. So you could say (+ (+ 2 3) 2) and get 7. All of the commands in lisp work this way, but it gets a lot harders to understand without properly writing it all out from here on out. Rather than programming procedurally, as in.
$x =5;
print $x;
Your programs ALWAYS take on a functional feel to them.

Most collegiate computer science programs strongly encourage their students to learn a functional language at some point in time. I remember my first brushes with them as kind of stressful for most of the students, but that it was greatly rewarding to master LISP.

One fun "first lesson" in LISP that I would recommend is to download GIMP and try making some drawings using it. While this is a good intro lesson, I would hardly stop my training in LISP here, as it would be sorely lacking, (especially since LISP is a popular language for AI, and this is not even a common application).

Anyway, that's the rundown on functional languages. Good luck in your pursuit of enlightenment!

UPDATE I almost suggested ML, or perhaps SCHEME, but decided Lisp was the most common among them. hding's post on learning functional programming in ML reminds me of "quilt ML" from my programming languages textbook sophomore year!

Just Another Perl Backpacker