[Tutor] What language should I learn after Python?

Dave Angel davea at ieee.org
Wed Oct 7 06:47:58 CEST 2009


Mark Young wrote:
>  I have no real need to learn anything for a job, it's just a hobby right
> now. I mostly just want "a programming language that has a different
> philosophy or approach than
> Python".  However, you guys are right, if I just learn a language without a
> reason, it will be worthless.
>
> When I tried to learn C++, I just got extremely confused, I didn't even
> understand the basic "Hello World" script. I may have given up too quickly;
> maybe I should try again, or maybe I'll try C.
>
> I was thinking about Java, and I heard about Lisp, I heard that it would
> supposedly make you a better programmer or something. I looked at Lisp, but
> I wasn't sure which one to use, Scheme or Common Lisp. I think I heard the
> same about Haskell, but I'm not sure if I'm remembering correctly.
>
> Thanks for the suggestions so far. I'm thinking about trying to go back to
> C++ or C, to study a a lower level language, or maybe Lisp, just to see
> different techniques in a high level language. I guess I have to accept that
> things will be different in any language, and if I want to learn different
> methods and gain new abilities, I'll just have suck it up and start reading.
>
>   
One of the problems with C++ is that it insisted on being a superset of 
C, in order to gain acceptability.  And although it evolved away, C 
started evolving towards it, so they've been chasing each other down an 
interesting road.  And one of the advantages is that you can generally 
use the same compiler for both, and even link files made with one with 
ones made with the other.  I'd mention that out of the 25+ languages 
I've used professionally over the years, C++ is one of my top three 
favorites.

On the other hand, perhaps you should learn something that has 
practically nothing in common with Python.  Forth is at a different 
extreme.  The entire interpreter/compiler can be defined in maybe 50 
lines of (Forth) code.  It essentially has no syntax, and the programmer 
is free to add things that in other languages would be considered 
syntax.  To put it another way, IF is a library function that changes 
how the subsequent code gets compiled.  And although it's standard (or 
builtin if you prefer), there's nothing stopping you from building your 
own language extensions.  Symbols have no restrictions on character set, 
although generally it's tough to have embedded spaces in them.

I don't know how the language has evolved since the ANS standard (XJ14 I 
believe it was 1994);  I got into other things.  When I used it, 
extensive libraries were not a strong point.  But some of the concepts 
are mind-blowing.

Forth was originally conceived and used for astronomy, where the 
computer controls for a telescope had to be reprogrammed in minutes for 
changing weather conditions.  It then expanded many places where small 
execution size was essential, in embedded systems, pda's, etc.  There 
have been a few processors that essentially used Forth as their machine 
language, and programming was essentially the art of adding instructions 
to the machine.  I have such a machine in storage somewhere, which had 
4k of RAM and 4k of Prom.  Nearly half of that PROM was unneeded, as the 
compiler, interpreter, debugger and editor didn't need that much space.  
The RAM was limiting however, for doing problems involving lots of data.

DaveA




More information about the Tutor mailing list