Re: Which programming Language
On Fri, 06 Feb 2009 18:25:31 +0100, Abdelkader Belahcene wrote:
> HI,
> There are many and many programming languages (mainly : C,C++,java,
> Shell, Perl, python, php). which learn and use, in which circonstances
> use that language instead of the other.
>
> In many situations we can use anyone, but which is better.
>
> thanks a lot
> bela
> ______
Let me be clear about one thing first. Until you've had a real taste of
programming, you won't know whether it's something you want to spend the
rest of your life doing. There are languages that are easy to learn and
use, and there are languages that are hard to learn and use. And a
number of so-called "teaching languages" are limited, so that you can
start to use them, and possibly like them, but when you get on to real
applications it's as if you're wading through deep water instead of
taking the boat. You won't even know you could be using a boat.
If you are starting to learn programming, I'd suggest you start with the
PLT implementation of Scheme and the textbook How To Design Programs.
Both are available for free online. I believe the PLT implementation of
Scheme also provides "teachpacks" that correspond well with the contents
of the book.
Why do I recommend this one? Because it teaches good ways of *thinking*
about the process of programming -- lessons you will not have to unlearn
later, and which are far more important than the details of a particular
language.
And it won't necessarily take all that long to understand the basics.
I've heard of people who have worked through the book in less than a
week. Even if it takes you longer, or much longer, a week is enough for
you to start to understand what's really involved in programming, and to
have a clear idea whether this is the kind of thing you want to do with
the rest of your life. AND THAT'S PROBABLY THE MOST IMPORTANT THING YOU
NEED TO LEARN AS A BEGINNER.
Once you have learned to think in the right way, you will find it easy to
pick up other languages more-or-less on demand.
But Scheme is not just a tiny "teaching language" that will leave you in
the lurch when it comes to doing "real work". Granted, there are tasks
it isn't ideally suited for. But some implementations of Scheme (notably
PLT Scheme) come with extensive libraries that make them eminently
suitable for a wide variety of real-world tasks. For example, effective
web servers have been written in PLT Scheme.
***
As for a second language, you'll have to consider what you're going to
use it for. The constraints are:
(a) What you have to be compatible with. Most large programming projects
have chosen their programming languages long before you're on the scene,
and you'll just have to go along with whatever they've chosen if you want
to be on the team.
(b) Whether you need to be intimate with the details of the hardware.
Assembler and C are often used in this case. For example, programming a
video driver for one of the modern video cards will need a language that
can talk about the hardware registers that exist on the physical
machine. This is why C gets used for the Linux kernel.
The big accomplishment of C in the early 70's was to give you most of the
advantages and disadvantages of assembly language without its
excruciatingly obscure syntax.
Not that there aren't better languages for doing this, too, (See Modula3
for a good example (completely different from Modula2, which I'm not
recommending)) but C was readily available and adequate when Linux was
started, and C was one of the first. See (a).
***
Overall recommendation: Start with Scheme, then progress to others if
you feel the need. If you already program in another language, spend a
while learning Scheme. You'll be glad for the lessons you learn, whether
you finally decide to stick with it or not.
Even if you only need to learn C, you're *still* probably better off
spending the time learning Scheme first. You'll learn C faster.
-- hendrik
Reply to: