Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

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

by Nitsuj (Hermit)
on Jul 29, 2001 at 21:23 UTC ( #100698=note: print w/replies, xml ) Need Help??


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
  • Comment on Re: Re: (tye)Re: How does learning C benefit a programmer?

Replies are listed 'Best First'.
Re: Re: Re: (tye)Re: How does learning C benefit a programmer?
by hding (Chaplain) on Jul 29, 2001 at 22:23 UTC

    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. :-)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://100698]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2022-05-22 14:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (80 votes). Check out past polls.

    Notices?