tags:

views:

1908

answers:

17

Hi guys, I`m currently studying C++ and want to learn another language.
For work I use C# + ASP (just started learning it, actually), but I want something "less Microsoft" and powerful.
I have heard Python is a popular and powerful language, not so complicated as C++. But many people mentioned it was hard for them to get back to C++/Java from Python because they started thinking in it, get used to absence of memory management, etc. What do you recommend?

+8  A: 

The benefit of going from a more static language to a dynamic language is to change your programming paradigm -- it's not a matter of becoming "lazy" so much as realizing new ways of accomplishing things, which will make you better in any language.

Andrew Coleson
+2  A: 

I don't think that "Python makes you lazy" (nice title, anyway!).
On the contrary, in programming as in life, knowing more than one language is important; I think you'll find python amusing and sufficiently different from C++ or C# so that the languages will not get mixed in your head...

Paolo Tedesco
+22  A: 

There's no right or wrong answer, really. But I think you'll benefit more from learning Python. Given the similarities between C# and C++, you'll learn a different way of thinking from Python. The more ways you learn to think about a problem, the better it makes you as a programmer, regardless of the language.

Pesto
+1  A: 

Learning more languages can only make you a better developer, regardless of their approach. Besides, your experience with C++ (or, at least C) will come in handy for writing high-performance parts of your applications using Python's C API, which lets "raw" C and C++ code intermingle nicely with the pure Python stuff.

I still write code in Objective-C (1.0... before memory management) and Python on a daily basis. The variety is actually fun, rather than confusing; keeps things from being boring.

Jarret Hardie
A: 

Flex your brain and improve your skill set. Give a functional language a whirl.

SnOrfus
+4  A: 

Well, I've learnt Python after C/C++, Java and C#. Python is a great language, and its simplicity and consistency have improved the way I code. It has also helped me think more clearly about the algorithms underlying my code. I could go on about the benifits it brought me, instead I'll summarize the reason to learn it ->

Learning a new lanuage doesn't take away, it adds to your programming skill and keeps you sharp by teaching you to shift between the frames of mind that each language requires.

So go out there and learn Python. Your code will improve(TM).

P.S.
1.You'll lose C++ (or any other language) skills, if you neglect their upkeep and maintainance. Thats entirely up to you.

2.Programmer (intelligent) laziness is a virtue.

batbrat
+1  A: 

It is up to what exactly is the kind of applications you want to program, for example for Websites that need access to databases I would go for Ruby( and Ruby on Rails framework ) , for financial applications or applications that need a lot of parallel processing I would go for a funcional programming language like Haskell, oCaml or the new F#, these last 3 wil make you a better programer even if you don't programm a lot in them , by the way c# has been lately in the latest versions adding more and more funcional programming features. I would learn Python for a security and exploits kinds of applications.

+3  A: 

Many would argue that you would benefit from learning Python before C++.

  • The syntax hurdles are much, much lower;
  • Debugging is much more friendly
  • There are a plethora of libraries---batteries included, you know. It's easy to experiment with web scraping, XML, etc. in Python. Again, the barriers to entry in C++ are much higher.

It's still good to learn C/C++, because of its close connection to the machine. But a new programmer can learn an awful lot from exploring in Python.

zweiterlinde
A: 

You could learn a new programming language, like python, and use it to do all the tasks you'd normally perform in your 'core' languages; or you could take a language (like python, or perl) and use it to complement your core language.

You could learn VBScript and use it to write scripts that glue your code and others together. If you want something less Microsoft, then python, perl or bash scripting would be a good idea - not just to learn how to code in the new, but also how to do things differently from the usual 'code an app' way.

gbjbaanb
+2  A: 

Python is complementary to C++ and easy to integrate with C++. (As evidence of this claim, the C++ gurus from Boost use Python.)

And as you said, Python gives you a way to get a perspective outside the Microsoft orbit. But even there, if you need to integrate Python with MS tools, there's IronPython.

John D. Cook
A: 

From a utility perspective, it is good to learn one of the more dynamic languages like Python (or Ruby or Perl) too. Not only do they stretch your mind, but they are superior for certain kinds of tasks. If you want to manipulate text, for example, C++ is a lot harder to use than Python. It gives you another arrow in your quiver to use when appropriate.

Steve Rowe
A: 

I learned, in order:

  • BASIC
  • Pascal
  • Ada
  • (A little bit of Haskell)
  • Java
  • Python
  • C++
  • C#

I don't feel Python inhibited my ability to learn or use C++. I am glad though that I learned pointers in Pascal before encountering reference types in Java, Python and C#, because I feel it gave me a good basis to understand the idea of the differences between "value types" and "reference types". I think for me the most important of those languages are Python, Haskell and C++. All of them complement each other, and although there are times I'm working in one and wish I had a feature from another, on the whole I think I benefit greatly from a deeper understanding of things like type systems, object orientation and metaprogramming by seeing the different ways these languages approach these things.

Weeble
A: 

Try LISP instead (or afterwards, it's your call). You are at least partially right, though. using Python for a while makes you not want to go back to a statically typed and compiled language. It's just sooo much more comfortable not to have to please the compiler like ALL THE TIME ;). And yet another aspect is the readability of python code, which is awesome.

Bartosz Radaczyński
Yes, Python is one of the few read/write languages. Most other are write only...
Ber
A: 

It is true. After learning python, everything else will seem like too much effort for the same amount of real work being done. You'll get used to the clean, small syntax and the freedom of GC. You will enjoy working in list comps, generators, etc. You'll start to think in python and C++ and Java will be like building a ship in a bottle one twiggy little stick at a time.

But since it's that much easier, doesn't it tempt you to try it all the more?

tottinge
A: 

I learned C/C++, Java, Python & C# in that order.

The two I actually invariably end up using are C++ & Python; I find the niche Java & C# occupy between them to be too narrow to feel the need to use them much (at least for the stuff I do).

I also think I didn't really "get" C++ functors and boost::bind until I'd been exposed to Python.

timday
A: 

I think it is always good to know several programming languages. I've learned c++ at school and I've used it a lot in the past years because it is really a standard in the industry. I've learned python by my own and I am using it to make a lot of nice tools that would be too long to write in c++. Python has just a very positive influence on my c++ skills. It gives another way to think.

luc
A: 

Many languages are quite similar to others, but to move between imperitave and functional / dynamic and static / Object and Procedural languages you do need to train yourself to think within the constraints of the language you are using. Since most projects are at least a few weeks, this is generally not a problem after the first few days.

You will find it more difficult to switch away from a language+environment you enjoy in your after-hours / hobby development.

  • C, Macro Assembler => basically the same - difference is mainly libraries
  • C++, Java, C#, Delphi => basically the same paradigm - you learn quickly how to leverage the features of the specific language and adopt concepts from one syntax to another. It's basically the same way of thinking, the biggest exception is how you think of memory manangement.

  • Python - good language, strategically a better choice than ruby, although there are other aspects of ruby that can be argued to be superior. What make python a good choice is the presence of a formal language body which keeps python environments on different platforms very compatible to one another.

If you are interested, read this http://cmdematos.com/?p=120 on making a strategic language choice.

cmdematos.com