HELP! Must choose language!

Roy Smith roy at panix.com
Mon Dec 30 10:13:22 EST 2002


Cameron Laird <claird at phaseit.net> wrote:
> C++ is a poor vehicle for communicating concepts, in
> comparison with Python, ML, Eiffel, or Scheme, say,
> and it's undeniably far harder to learn than C, let
> alone Python, Smalltalk, ...

I'll agree with that 100%.

I know (or have known) a bunch of languages; Basic, Fortran, C,
various assemblers, lisp, Python, TCL, Perl, Hypercard, NewtonTalk (or
whatever it was that you programmed the Apple Newton in), SQL,
assorted Unix shells, postscript, HP-41-ish, and probably a few more I
can't think of now.  I like some of them, and dislike others, but I've
never seen one which was as complex to learn as C++.

I've made a few attempts to teach myself C++ over the years, all of
them have been failures.  I'm currently in the middle of a much more
serious attempt, this time with the advantage of having a couple of
experts around to pester with questions.  I think I'm finally getting
it now, but progress is horribly slow.

The problem is, I never feel like I'm programing the *problem*, I
always feel like I'm programming the *language*.  I design a fairly
simple class which would take me an hour to write and debug in Python
and find myself spending days fighting with syntactical complexities
and struggling to figure out bizarre error messages.  Special cases
and surprises abound, which makes it very difficult to generalize
anything I've already learned.  Here's one that bit me just the other
day.

Call a function with 2 args: function (arg1, arg2);
Call a function with no args: function ();
Define an object with 2 initializers: myClass o (init1, init2);

Now, try to generalize that to defining an object with no
initializers.  Obviously, I wrote: myClass o();

Well, heck, it turns out what I really did was to declare a function
called o which take no arguments and returns an object of type
myClass.  I didn't get an error message until the first time I tried
to use the object, and then the message was so mind-bogglingly bizarre
I had no clue what I did wrong.

Bletch.

Please don't try and learn C++ as a first language.  Even if it
doesn't completely turn you off to programming, it'll poison your mind
as to how things "should be".

There is one and only one reason I'm forcing myself to learn C++ now,
and that's because in the current job market, it seems like you can't
even get an interview if you don't have it or Java on your resume, and
this seems like the lesser of two evils.




More information about the Python-list mailing list