[NTLUG:Discuss] Direction Recomendations

Steve Baker sjbaker1 at airmail.net
Thu Jul 20 00:30:10 CDT 2000


Language wars tend to get very heated and passionate...tread with care!

Cameron wrote:

> C:
>  Most "applications" are written in C in the Linux/Unix world.  Very
>  fast and robust, but takes more time to learn and program (in general).
> 
> C++:
>  A lot like C but not.  ;)  Learning it would be about the same as
>  learning C.

C++ is a 100% super-set of C.  If you have learned all of C++ then you
already know C...providing you can remember all the things C can't do
that C++ can!

Conversely, if you know C, you can write programs that will compile as
C++ - although you won't be using the full expressive power of C++...
which is very important.

I advise you to learn C first - then progress on to C++ later.
 
> Perl:
>  Great for text processing and system administration type things.  Very
>  useful and powerful tool.  It's interpretted instead of compiled, so
>  it's slower than C/C++.  But development time is a lot shorter largely
>  because you don't have to do all the memory management that C/C++
>  warrants.
> 
> Python:
>  I've only used it a little, but my impression was that it's like Perl
>  but is more targeted at Object Orientation.  Overall I've enjoyed
>  learning Python and would recommend it to a novice programmer wishing
>  to learn OOP without having to tackle memory mgmt.

Python, Java and Perl are interpreted languages.  That means that they
are S-L-O-W compared to equivelent code written in C or C++.  We are
talking 5 to 50 times slower here.

However, the very fact that they are interpreted makes it somewhat
easier to get started with programming.  Errors are caught more
gracefully and there is zero delay between correcting a problem
and trying again.  If something goes wrong inside a C program,
it'll just crash with no diagnostics at all.  When something
happens inside a Python program, you get a line number and some
clue as to what happened.

Python, Java and C++ clearly belong to the same family of languages.
They share quite a few basic concepts and it's fairly easy to
learn one once you know another.

Perl is a nasty mess IMHO - learn it only if you absolutely need
it - certainly not as your first language.  Other people are
passionate about it - so I expect to be contradicted on this one.

I would say that if you are interested in 'system programming' - gluing
together other applications,etc - then use Python.

If you want to write end-user applications, write device drivers, hack
the kernel, etc - then C and eventually C++.  Probably 95% of Linux
programs are in C or C++.  If you want to hack other people's
programs and contribute to Linux - then you really have to know C.

If you want to write things that work over the web - Java.

If you want to do Artifical Intelligence - Lisp.

If you want to work on large accountancy packages written in the 1960's,
and '70s learn COBOL.

If you want to work in military computers - learn Ada.

If you are into big numerical number crunching - FORTRAN.

If you are programming a telephone exchange in Europe (!) - CHILL

If you are teaching children to program - LOGO.

If you never want anyone else to be able to understand what
you wrote - but need to solve complex math problems in a single
line of code - APL.

...and so on.

There are hundreds and hundreds of other languages - but most are
obsolete or non-optimal for one reason or another - or operate in
small niches of the computer world where others fear to tread!

It's also true that if learning your first language takes 10 "units" of
effort (because you are also learning how to program), then learning a
second language takes only 5 "effort units" (3 to unlearn the first
language - 2 to pick up the second :-) - but after that, learning a
third, fourth, fifth language is about 1 unit of effort. *so* easy
that new languages can be picked up in a day - and become second
nature in a week.

I bet I've used 50 different programming languages over the years
- whatever you choose, you aren't stuck with it for life!

-- 
Steve Baker   HomeEmail: <sjbaker1 at airmail.net>
              WorkEmail: <sjbaker at link.com>
              HomePage : http://web2.airmail.net/sjbaker1
              Projects : http://plib.sourceforge.net
                         http://tuxaqfh.sourceforge.net
                         http://tuxkart.sourceforge.net
                         http://prettypoly.sourceforge.net





More information about the Discuss mailing list