[Tutor] Question

Dave Angel davea at ieee.org
Sat Jun 19 12:31:30 CEST 2010


Alan Gauld wrote:
> <div class="moz-text-flowed" style="font-family: 
> -moz-fixed">"Independent Learner" <nbr1ninrsan7 at yahoo.com> wrote
>> ~I was wondering if I should try to learn 2 programming languages at 
>> once, Python and C++. 
>
> No, no no! If it had been a different pair I might have said try it. 
> But C++ is one of the most difficult, complex and difficult 
> programming lamnguages out there. It is full of subtle things that can 
> trip you up and cause very weird and subtle bugs that are diffficult 
> to find. And it has similar concepts to Python but implemented so 
> entirely differently that studying the two together will be an 
> exercise in frustration.
>
> Part of the reason why C++ is so difficult is because it is so 
> powerful. You have full access to the machine through the C language 
> elements, plus a full OOP environment, plus a powerful generic type 
> system. Plus it combines static and dynamic variables with a reference 
> model all with slightly different syntax and semantic behaviours.
>
> At work I hardly ever recommend that people go on language training 
> courses, C++ is the exception! You can learn C++ by yourself but you 
> will need a good book and a lot of time and patience.
>
>> Obviously I am working on learning python right now, I have gotten up 
>> to Classes
>
> Stick with Python and get comfortable with that.
>
> <snip>
I concur 100% with Alan's advice to learn one language thoroughly first, 
and I think Python is the one that would have best suited me as a first 
language, if it had been available.  Python was approximately number 30 
for me, not counting the languages I learned entirely for personal 
reasons.  Currently on the job I mostly use C++, Python, and Perl.


C++ was indeed the hardest language for me to learn, but was the most 
rewarding for its time.  It's the only language I went to classes for, 
and one of the lectures was taught by Bjarne Stroustrup.  Fortunately, I 
had a coworker on the ANSI language standardization committee, and 
access to lots of other people who knew it rather well.

Once you have one or two languages very comfortably under your belt, 
then go ahead and learn anything else you like. But even then, if you 
have to learn two new ones at the same time, I'd recommend they be very 
unlike.  So you could learn Lisp or Forth at the same time as you were 
learning Ruby, but I'd not try to learn Perl and Python at the same 
time.  (Actually, Perl is driving me crazy at the moment, and I'm only 
using it because we have a series of large scripts written in it.)

I drive a motorcycle for my main transportation, and my wife's van 
otherwise.  And I never get confused between the controls on one and on 
the other.  But at one time I had a Harley with the brake on the left, 
and gearshift on the right (ie. normal at the time), and switching back 
and forth between that motorcycle and others almost caused an accident.  
When learning to ride, I can't imagine using two different motorcycles 
with swapped controls.

Good luck, and post questions here when you have them.

DaveA


More information about the Tutor mailing list