Question: I've been programming C++ for about 5 years now, and I now realize the value of knowing how to think "differently."

This question is for C++ programmers who tried out other programming languages and came across moments like:

* "Whaoo..this is sooo cool! I didnt know I can program like that."
* "Wow, I never thought a design problem could be solved that way!"

So, which language did that to you? I'm looking for maximum effect, so I dont think Java would fit the bill. =p I'm open to any suggestions, though!

Disclaimer: I ask this question primarily because I want to expand my mind. There is no intention to start **any** programming language war here!

Answer: 
The whole "Whaoo..this is sooo cool! I didnt know I can program like that." revelation came to me when I first learned [functional programming](http://en.wikipedia.org/wiki/Functional_programming). In my case, this came through my studies in [Tcl/Tk](http://www.tcl.tk/), which is multi-paradigm, but I imagine you can get the same effect from any of the strongly functional languages (such as Lisp or Scheme).
I posted, above :

```
For instance, in Javascript :
button.onclick = function(){ some code }

```

And got this comment :

> 
> that button.onclick example was definitely cool. and it looks very intuitive too. thanks! – ShaChris23
> 
> 
> 

I find this very interesting.

When you work in a low-level language like C++, you don't think about the things that are possible to do in a higher-level language.

ShaChris23 thinks like a C programmer discovering JavaScript : this is "cool". Which is true !
But a JavaScript programmer discovering C++ will think the reverse, like "how crude a language, I can't even add a method to a class at runtime !" and he'll be right, too.

For instance you'd use a Factory pattern, when a Python programmer will just put the class in a variable and pass it. Someone who never learnt anything besides C++ will not dream of that !

For instance, in Python I wrote a time-based scheduler, which was called like :

task\_handle = scheduler.execute\_at( time, function )

Using a closure for "function" makes this extremely powerful. Those that don't know the concept of "closure" can't think about this. 

Learning new languages, even only learning the basic concepts, will make you a better programmer in all languages, because it will expand your perspective.

Even if you never use it, learn Lisp...

JavaScript is good too, it has strong functional prog genes !

I wish EVERYONE learnt at least Python.

Then no-one would ever write bug-ridden text manipulation in C, lol.