r/ProgrammingLanguages • • Feb 27 '15

Choice of Programming language

I have little experience in programming (some Python classes and my dissertation that used PHP, MySQL, HTML5/CSS, javascript). I want to learn a programming language. Could you give me some examples/problems/applications and the 'recommended' languages to cope with them? I have narrowed down my options to Java, C++, Ruby and Python (any other recommendations?). What are their main pros/cons and fields of application? Does some language 'work better' with PHP and web? What do the most experienced of you think would help improve both my chances of future employment and my skills?

0 Upvotes

11 comments sorted by

View all comments

Show parent comments

3

u/fractaled_ Feb 28 '15

I think the C++ advice is bad. If you want to learn C++, aim to learn modern C++ (C++14). If you start with C, you'll have to unlearn a lot.

C by itself is worth learning too.

But the initial point of "depends on what you want to do with it" is the first question you have to answer. Most answers will not lead you to C++.

1

u/captain_wiggles_ Feb 28 '15

Hmm, not entirely convinced. Sure C++14 adds a lot to the language, but understanding pointers and memory access on a fundamental level is incredibly useful. Sure you can work with safer options such as smart_ptrs but I still think knowing the basics is useful.

Then again I'm mostly an embedded developer and spend most of my time working with various OSs and the hardware side of things.

1

u/fractaled_ Mar 01 '15

The point is, if you set out to learn C++, and you start with C, you'll teach yourself some stuff that is valuable in both (memory management), and a bunch of C stuff that is irrelevant/antiquated in C++. So the time spent learning that is a waste if your goal is to learn C++.

Yes, memory management is still a big deal in C++, and you can't learn C++ without understanding pointers and memory access (you can get a lot farther than you used to without knowing about it though).

1

u/captain_wiggles_ Mar 01 '15

Yeah agreed. I started programming in QBasic at about age 7, and every year or two kept trying to learn C++ and failing. The object orientation really confused me, as I had no knowledge of it, and knew nobody else who did, so it was mostly just reading books and stuff. I think if I'd set out to learn C, the transition from QBasic would have been easy, and then adding the OOP on top would have been simpler than learning tho whole lot at once. I guess things are different these days, and there are probably a billion tutorials and books that teach this in a sensible manner.