Best Programming first language

  • Thread starter Thread starter Dtm
  • Start date Start date
C++ will make you tear your hair out to do relatively simple things

For simple things, you use a library. But I understand what you mean. C++ development takes longer.
 
This reminds me of a discussion we have recently over whether it's still worth it to learn C.
I'm also glad that Daniel Duffy has the foresight to dedicate the first two levels in our online C++ certificate to teach C. I know a lot of students questioned that mightily but I'm sure it will serve them well in the long run.

It's pretty tempting as a beginner to take a shortcut and jump to the latest, most fashionable language at the moment, be it C#, F#, Ocaml, whatever but it's good to build a strong foundation first. And it's clear that one needs to be versatile and should know more than just one language.

I would have loved to jump into C++ directly, but having skipped the fundamentals will come back to haunt you then realise that you are missing some vital concepts.

As APalley stated, learn C/C++ you can learn ANY language after that (F# maybe not).
 
C++ is among the worst first languages to learn.

... according to Linus Torvald ...

I think we need a larger sample population.
In "Coders at Work' (http://goo.gl/kwmMq), it seems all of the people interviewed dislike C++. This might be a small sample but all the interviewees carry a lot of weight in the developer community.

Here is a link to a blog post by the author of the book:

http://gigamonkeys.wordpress.com/2009/10/16/coders-c-plus-plus/

There are plenty of strong opinions against C++ in that book but I will reproduce a fragment of Ken Thompson (http://en.wikipedia.org/wiki/Ken_Thompson) interview:
I would try out the language as it was being developed and make comments on it. It was part of the work atmosphere there. And you’d write something and then the next day it wouldn’t work because the language changed. It was very unstable for a very long period of time. At some point I said, no, no more.

In an interview I said exactly that, that I didn’t use it just because it wouldn’t stay still for two days in a row. When Stroustrup read the interview he came screaming into my room about how I was undermining him and what I said mattered and I said it was a bad language. I never said it was a bad language. On and on and on. Since then I kind of avoid that kind of stuff.
...
It certainly has its good points. But by and large I think it’s a bad language. It does a lot of things half well and it’s just a garbage heap of ideas that are mutually exclusive. Everybody I know, whether it’s personal or corporate, selects a subset and these subsets are different. So it’s not a good language to transport an algorithm—to say, “I wrote it; here, take it.” It’s way too big, way too complex. And it’s obviously built by a committee.

Stroustrup campaigned for years and years and years, way beyond any sort of technical contributions he made to the language, to get it adopted and used. And he sort of ran all the standards committees with a whip and a chair. And he said “no” to no one. He put every feature in that language that ever existed. It wasn’t cleanly designed—it was just the union of everything that came along. And I think it suffered drastically from that.
 
In terms of bad choices, it's right up there with VisualBasic.

VB.NET and VBA (eh! Excel) are very popular languages. VB.NET has the same functionality as C#.
 
In "Coders at Work' (http://goo.gl/kwmMq), it seems all of the people interviewed dislike C++. This might be a small sample but all the interviewees carry a lot of weight in the developer community.

Here is a link to a blog post by the author of the book:

http://gigamonkeys.wordpress.com/2009/10/16/coders-c-plus-plus/

There are plenty of strong opinions against C++ in that book but I will reproduce a fragment of Ken Thompson (http://en.wikipedia.org/wiki/Ken_Thompson) interview:

I am not surprised. C++ is not for everyone.
People should make up their own minds:) and/or tell their own experiences.

I suspect Coders at Work are academics and they have their own pet projects and esoteric languages. Dominic Connor would would call them quiche languages'.

C++ is too close to engineering discipline I suspect for some folk.

Each to his own.

BTW could not find the interview by KT (just a Wiki page). Is there an executive summary?
 
You can basically think of Google's C++ subset as C plus a bit of sugar:
  • The ability to add methods to structs
  • Basic single inheritance.
  • Collection and string classes
  • Scope based resource management.

You're kidding!

No STL, Boost etc.??
 
I see alain has decided to change the topic from the first PL to a PL in general... :)

Just a note:
I suspect Coders at Work are academics and they have their own pet projects and esoteric languages. C++ is too close to engineering discipline I suspect.
Definite +1 here.

I've had some exposure to the PLT community (more broadly incl. designers and implementers of PLs, adding the, quite heated at time, LtU discussions to that) and this is almost exactly word-for-word quote fully capturing what almost all of them have to say:
Joe Armstrong, similarly, has never felt the need to learn C++: No, C++, I can hardly read or write it. I don’t like C++; it doesn’t feel right. It’s just complicated. I like small simple languages. It didn’t feel small and simple.

Very academic, very PLT.
For a pragmatic counterpoint, I like Bjarne's quotes:
"There are only two kinds of languages: the ones people complain about and the ones nobody uses".
"There are more useful systems developed in languages deemed awful than in languages praised for being beautiful--many more".

Going back to the topic, I still would think that C++ isn't optimal to choose as the first PL to learn -- but second or third should be just fine and quite recommended in a quantitative/computational discipline. A large part of the rationale behind my view is that I've found most of the learning materials tuned to the "C++ as the first PL" approach horribly, unacceptably bad. Come to think of it, the only excellent introduction-to-C++ books I can think of are "Accelerated C++" and "C++ Primer" (NOT the "C++ Primer Plus" crap by Prata) -- and I think both are easier to read once you've gotten at least one PL under your belt.

As for the first PL, I'd still stay with my recommendation of learning FP first if you're mathematically inclined (e.g., pure math, CS majors).
 
I see alain has decided to change the topic from the first PL to a PL in general...

Naughty :D
 
http://yosefk.com/c fqa/defective.html

This is very superficial and probably written by someone who does not know C++ and/or its rationale.

e.g. STL is an excellent library. Feel free to comment on my comment:) but please give examples.

No way to locate definitions
Lol! On Windows, use Intellisense.

Very complicated type system

Well, no.
 
I am not surprised. C++ is not for everyone.
People should make up their own minds:) and/or tell their own experiences.

I suspect Coders at Work are academics and they have their own pet projects and esoteric languages. Dominic Connor would would call them quiche languages'.

C++ is too close to engineering discipline I suspect for some folk.

Each to his own.

BTW could not find the interview by KT (just a Wiki page). Is there an executive summary?


Here is the list of people from Coders at Work. They don't look too academic:
They might seem academic but their contributions to industry are legendary.

The interview with KT is on the book. Here is the link to the blog post:
http://gigamonkeys.wordpress.com/2009/10/16/coders-c-plus-plus/
 
Thanks for the list. It's very useful.

They might seem academic but their contributions to industry are legendary.

I don't doubt that for a moment, but that is beside the point.

With the exception of Dan Ingalls (the inventor of Visitor patterns aka multiple polymorphism) and DK, I have encountered. Maye it's because it's CS and not engineering. And that's the crux of the issue here. Most developers have probably not heard of them.

list B (huge impact in engineering)

John Backus
Edsger Dijkstra
Sid Hoare
David Parnas
Barry Boehm
Ed Yourdon/Tom de Marco
Steve McConnell
Nicklaus Wirth
Grace Hopper
Fred Brooks
..
 
I'd love to know what Backus, Dijkstra and Wirth have to say about C++.
 
I'd love to know what Backus, Dijkstra and Wirth have to say about C++.

Here is a video on Dijkstra (in Dutch with English sub-titles)

His thesis is the dumbing down of CS education and lack of courage to teach hard science.
 
I think that the criteria for choosing a first language have not been addressed. Some are:

1. Promotes structured programming techniques
2. Proximity to the hardware

Probably no single language fits the bill. In the past Pascal and Eiffel were proposed but they have gone out of fashion. C is very close to the 'wire'.

Eiffel has it all. It competed with C++ in the late 80's, as did many languages.

http://en.wikipedia.org/wiki/Eiffel_(programming_language)
 
I would try out the language as it was being developed and make comments on it. It was part of the work atmosphere there. And you’d write something and then the next day it wouldn’t work because the language changed. It was very unstable for a very long period of time. At some point I said, no, no more.

In an interview I said exactly that, that I didn’t use it just because it wouldn’t stay still for two days in a row. When Stroustrup read the interview he came screaming into my room about how I was undermining him and what I said mattered and I said it was a bad language. I never said it was a bad language. On and on and on. Since then I kind of avoid that kind of stuff.
...
It certainly has its good points. But by and large I think it’s a bad language. It does a lot of things half well and it’s just a garbage heap of ideas that are mutually exclusive. Everybody I know, whether it’s personal or corporate, selects a subset and these subsets are different. So it’s not a good language to transport an algorithm—to say, “I wrote it; here, take it.” It’s way too big, way too complex. And it’s obviously built by a committee.

Stroustrup campaigned for years and years and years, way beyond any sort of technical contributions he made to the language, to get it adopted and used. And he sort of ran all the standards committees with a whip and a chair. And he said “no” to no one. He put every feature in that language that ever existed. It wasn’t cleanly designed—it was just the union of everything that came along. And I think it suffered drastically from that.

Clash of the Titans.
 
Great discussion here. Had to weigh win / rant. Note: I am still a student, and by no means an expert.

My experience: I first started learning C and then C++ (started, but haven't finished...)

I had a great time learning, up until I hit the subject of Classes (aka OO). What a pain. Why would I ever use classes, when I could write a function that does the job? Input in, output out. So I thought at the time.

Why is it a pain? Private/public/protected. Setters/getters. Interface / implementation files (let's have some fun with copy/paste!).

This all gets in the way of how useful OO really is.

Seriously. Let's make all state variables private, because that's best practice. OK, now opt-out those variables you want to actually use by creating getters/setters. Just do it, because everybody does. Wait, what?

Screw that. Save encapsulation for later. I'm a functions guy from now on.

And's that how I existed, until along came Python. Holy.

Now that's how OO works. I get it now.
 
And's that how I existed, until along came Python. Holy.

Now that's how OO works. I get it now.

Yes, Python is an excellent language to learn OO from. You can even create and deploy classes at the command line.

As for the argument that if you learn C++ you can learn any other imperative/OO language because it will seem easy in comparison, that's like Arnold telling the 98-pound weakling that if he can bench press 500 pounds, he can bench press 100 pounds as well.
 
As for the argument that if you learn C++ you can learn any other imperative/OO language because it will seem easy in comparison, that's like Arnold telling the 98-pound weakling that if he can bench press 500 pounds, he can bench press 100 pounds as well.

There are two orthogonal issues 1) best 1st language 2) C++ ==> you can learn any language.

The 100 pound press (what's that in kilograms?) corresponds to C.

Maybe better analogy?
Jigoro Kano - the founder of judo - was not a strong kid but he concentrated on improving his skills that he could beat much stronger opponents.
 
Back
Top Bottom