http://qs321.pair.com?node_id=100608


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

You said: The next item I'd probably add to the list would be some "functional" programming language.

Can you be a bit more explicit? I'm assuming you mean there is little or no value in learning C and it would be better to learn something like Python or Java instead. Would this be accurate?

$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop";
$nysus = $PM . $MCF;
Click here if you love Perl Monks

  • Comment on Re: (tye)Re: How does learning C benefit a programmer?

Replies are listed 'Best First'.
Re: Re: (tye)Re: How does learning C benefit a programmer?
by Nitsuj (Hermit) on Jul 29, 2001 at 21:23 UTC
    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

      To be honest, even though I am a Lisp advocate, I don't necessarily think it's best suited for learning functional programming, because it is by nature multi-paradigm, and just as well suited for imperative or OO programing as functional (and is heavily used in all those ways). I think it's better to start out with something that is at least "almost" purely functional, like ML or Haskell. That way one has to program functionally. Then if one wants to get back to Lisp later, one will have a good feel for how to use its functional aspects as well as its imperative and object-oriented ones.

      (BTW, people say Lisp now, not LISP. :-)