Hi, I only know C++ as a medium level programmer, not a real beginner but absolutely no veteran, I need to learn so much more C++ stuff. I can fairly program small programs in C++ and i really like C++. I also started using some of the new cool C++11 things in my code. I think I'm into C++ for the long haul, I just love it too much.

What language should be most easy/most inline with C++ to learn or to use for me as a C++ programmer to program server side web scipt development ?

RoR ? PhP ?

Thanks!

The syntax for PHP is derived from the C family of languages, Ruby isn't. You'd feel more comfortable with PHP, but it's generally a good idea for programmers to have some familiarity with different language families.

yes, I read everywhere that programmers should know several languages, but tell me, aren't you confusing them all the time when coding once in one language, and then in another ?

How does this work practically ?

Isn't it better to be splendid in 1 language than to be mediocre in 5 ?

aren't you confusing them all the time when coding once in one language, and then in another ?

Only rarely, and only with languages I don't use on a regular basis.

Isn't it better to be splendid in 1 language than to be mediocre in 5 ?

There are some benefits to fluency, but they're vastly overwhelmed by the quality of the programmer. A good programmer doesn't become mediocre by using an unfamiliar language, and a mediocre programmer will still be mediocre regardless of fluency in a language.

I think it's more important to learn multiple languages for two reasons:

  1. A programmer who can hit the ground running (ie. already knows the implementation language) is far more marketable.
  2. Learning wildly different language families (Algol derivatives versus LISP variants, for example) gives you valuable insight by forcing you to change the way you think. In practice, I've found that the ability to think squiggly is mighty handy, and experience with different ways of going about the same thing is the best way to practice that skill.

I find that Python is a really nice language to learn in addition to C++, because it is very different (very high-level), easy, and it works very well along-side C++ (Python is often used as a high-level scripting language to use to run C++ code, through python-bindings).

I read everywhere that programmers should know several languages, but tell me, aren't you confusing them all the time when coding once in one language, and then in another ?

I happen to speak four languages at functional to fluent level (English, French, Swedish and German), and I have basics skills in a few others (Spanish, Italian, Finnish, and Dutch). I usually don't confuse them when I speak or write. But, for example, when I go to Sweden, it takes me a week or two to get used to speaking Swedish on a daily basis (which I don't use here, in Canada), in that time, my skills and knowledge of the language move from latent (passive) to active. Also, knowing many languages gives rise to a few quirks, like using words from one language when speaking another, or being frustrated once in a while to not be able to express something in one language as well as you could in another (e.g., I always swear in canadian-french, because it expresses it better). Then, there are subtle influences, for example, because french is my native language, when speaking english I tend to use more words and expression of french ethymology, and my sentence structures are influenced by it too.

My point is this: the above applies almost directly in the same way with respect to programming languages. You don't confuse them, but your language backgrounds (especially your native programming language) tend to influence the way you program in other languages, in subtle ways. You get similar quirks and frustrations when you miss a feature or behaviour that you liked from another language, but these are minor issues. And of course, you can't just switch between languages too quickly. For example, I have learned Java in the past, but I rarely program in Java anymore, ever, but if I need to use Java on a given project, I'll be able to start right away and my performance in it will probably ramp-up in the first week or so, and then I'll be almost as good as any other average Java programmer.

But what remains, regardless of the language you happen to use, is your skills at solving problems, the kind of design patterns you use, your general computer science knowledge (algorithms, data structures, etc.), and so on. The only hurdle is to be able to express your solutions in the given language. Like, when I speak German, I sound like an idiot, but that's only because I lack the ability to express my "intelligent" thoughts. I could say the same about many programming languages.

How does this work practically ?

In practice, you usually will use just one programming language at one given time period. And you need other programming languages to read other peoples code or to write auxiliary parts of your program or library (e.g., drivers, high-level scripts, etc.). You will rarely code intensively in many languages at the same time. At least, that's been my experience (it might be different in other fields).

Isn't it better to be splendid in 1 language than to be mediocre in 5 ?

Depends. Is it better to be the greatest linguist / writer in one language? Or, to be able to speak many languages? Well, they serve different purposes. The former has produced most of the greatest works of literature. The latter allows many people to be versatile, to travel, to communicate, etc.

For the same reasons that deceptikon mentioned, I also think it is important to know different languages. I would say that you should be really good (and productive) in the dominant language in your field. Then, you should be average-level in about 3-4 more languages that are also relevant to your field. And finally, you should be familiar with about half-a-dozen other languages. For example, my field is robotics: I'm an expert in C++; I'm very comfortable in C and Matlab / Simulink; I'm learning Python and getting more and more comfortable with it; and, I'm familiar with Fortran, Assembly, C#, Java, LabVIEW, and a few scripting or web-page languages. I think that such a layering is very important, and also arises naturally from experiences.

From a theoretical perspective, it is also important to know languages that are very different from others (and I'm lacking a bit at that). The main thing here is that there are many programming paradigms (ways to think about a programming task / solution). Some languages have more emphasis on a particular paradigm (either forced by the language itself, or by its traditional use). Being exposed to many languages is a good way to absorb the power that each paradigm offers. Especially since C++ is a multi-paradigm language, the knowledge of different programming paradigms can be very useful, and almost a pre-requisite to becoming an expert in C++.

Also, knowing many languages help you think about programming tasks in a more abstract way (i.e., detached from language-specific details). While knowing too few languages can lead to a silo-effect (e.g., the field of aspect-oriented programming (AOP) is almost entirely the consequence of a bunch of people who program almost exclusively in C#/Java and are mainly trying to deal with one of its short-comings (lack of templates), and now they've been holding conferences for many years on this subject. That's a perfect example of this kind of silo-effect).

Just like human languages, once you are fluent in one it is unlikely that you will confuse it with another that you are also fluent in. I know a LOT of programming languages, and have never had a problem moving from one to another. If I don't use one for a long time, I like to have documentation handy for those niddling edge cases that can drive you to distraction. A good example of that is java, which I have been back to serious programming in after a 7 year hiatus.

In any case, I would agree that for simularity to C/C++ that php would be a good choice as a web application language. Another one good to learn would be javascript.

I would suggest also PHP, 'cose its syntax derivate from C, and C++ syntax also.

Influenced by C, C++, Java, Perl, Tcl
Implementation language C

Got them outa Wikipedia.

Thanks for your posts. As a European, I speak 4 languages and indeed, I just came back froma trip to Germany and it took me some days to get into speaking it without 'thinking'. i can only hope that this will work the same with programming languages. (I strongly agree with the remark that cursing in your mother tong just sounds best)

I like the python idea a lot, What about me learning it with Django? That way i learn a different language and fixing my server side programming language need ? Bad/Good idea ?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.