[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Prog. Languages (was: question?)



On Fri, Jun 01, 2001 at 02:13:20AM -0700, Romain Lerallut wrote:
| --- "Wayne Sitton" <waynes@techgod.net> wrote:
| 
| >My question is what programming language is best to learn??????
| 
| Usually, you choose a language depending on what you want done. YMMV.

Ditto.

| If you want to learn a bit about computer languages *in general* you
| may want to:
| 
| 1) start with interpreted languages, 

Ditto

| such as Perl. ( not Python which is strongly object-oriented). It's
| easy to create a proglet that is useful , and very satisfying.

I disagree here.  Python is strongly object-oriented, but you don't
have to know you are dealling with objects until you are ready to
leanr about "classes".  You can write programs that only use functions
and built-in types in traditional Perl style.  I feel that Perl is too
complicated and tricky to keep track of all the slight variations of
the punctuation that have very different meanings.  I saw this quote one
time that I found to be funny, and rather accurate :

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Python is executable pseudocode. Perl is executable line noise.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

| 2a) then learn about object-oriented languages (Java, Python). I
| would advise *against* starting with an OO language, since it
| *might* be harder to come back to non-OO languages.

I started with OO (Eiffel, then C++ and Java, then C,  I learned
Python on my own in the middle,  then a little Common Lisp and Perl)
This is the order of the courses at my school.

I agree with Romain that once you get in the habit of OO (good
encapsulation and polymorphism) it is very hard not to use it.  I
don't think that is a bad thing either -- OO is a nice way to design
an easier to maintain and extend system.  For example even though C is
not naturally OO the GTK+ developers used a strongly OO style which
makes GTK as easy to learn as any other toolkit (such as Qt or Swing).
Constrast that with XForms <shudder>.

| *OR*
| 
| 2b) then learn about compiled languages such as C. C is harder to
| program than interpreted languages, mostly because of memory
| management issues, but it is also IMHO very elegantly written.
| 
| It has a lot of balance in its conception. You can understand more
| of the internals with C than with Java.
| 
| *After* being decently fluent in C, you may want to learn C++ or
| others. Though I like C better for its simplicity and elegance.

C is nice and simple and well suited for lower level task.  It was
originally designed as a systems programming language, not an
applications programming language. 

If you learn C/C++ or Java after learning Python you can use them to
enhance Python.

| 4) or then learn highly abstracted languages such as Lisp or
| Objective CaML. Very good stuff there, but rather abstract I'm
| afraid. This is a special realm, be warned. :)

They are interesting.  Maybe add Prolog and Haskell to the list?  I
don't know too much in this area, but I got an intro to Common Lisp
and Scheme while getting an intro to Functional Programming in a class.

| 5) re-code KDE in assembly language. 

Hah, there goes your portability ;-).  That's fine by me since I like
GNOME anyways :-).  See the steps below -- notably 1 and 3.

| These are my opinions, based on my experiences with those languages
| (assembler and Python exepted), and my own tastes. Others may have
| different opinions, but PLEASE this is NOT a troll comparing the
| respective merits of different languages.

Ditto (except that I have used Python and M68k Assembly,  Python is my
favorite language).

| Just don't use Fortran !! 
| 
| ( I do enough of it for both of us and a lot left over)

:-).  I have heard that Fortran can be quite painful in the cranial
area ...  


A good practice of programming invovles the following steps :

    o  code in a high-level language that allows for RAD development
        (RAD == Rapid Application Development)

    o  profile the app to see where most of the time is spent,  80% of
       the execution time is spent in 20% of the code and it is
       usually not the code you expect

    o  recheck your algorithm to be sure you are using the best one,
       use a different one if necessary

    o  iff the app is still too slow recode the _portions_ that are
       bottlenecks in a lower level language to improve the speed

Python is excellent (IMNSHO) for the first 3 steps, and C, C++ and
Java work very well with Python for the last step.


I think that Python is an excellent first language, and depending on
your needs, could be the only one you need.  It is still beneficial to
study other languages and understand the tradeoffs involved with the
different combinations of features.

Another thing to learn:   if you plan on writing large applications
and maintaining them over some period of time, design is much more
important than the language you implement it in.  If you only want to
tinker with some "throw-away" scripts, then pick a fun, easy to learn
language and just have some fun :-).


-D



Reply to: