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: 
A recent "This is so cool!" for me was Scala. It combines functional programming, objects and threads in a great way, and it all runs in the JVM.

For me it was the first really cool thing I'd seen that was Java related. :)

Oh, okay, it was the second. The first was a reversible debugger which I forget the name of, but it let you run the virtual machine "backwards" in order to find a bug.
I'd recommend J (jsoftware.com), as I always do. It differs from most other languages in that it is symbolic (though the symbols are all rendered in plain ASCII) and functional. More importantly, it is dynamic, interactive, and it has a lot of high-level concepts built-in.

For instance, taking a cue from one of the other posts here, factorial in J is:

```
   !10
3628800

```

for, e.g. factorial 10. Extending this, to evaluate the number of 10 things taken 5 at a time:

```
   5!10
252

```

Arrays are first class objects, so factorial of 5, 10, and 15 is:

```
   !5 10 15
120 3628800 1.3076744e12

```

and the number of ways to take 3 things from 6, 8, and 10 things:

```
   3!6 8 10
20 56 120

```

A palindrome checker could be written

```
   palincheck=: 3 : '(]-:|.)tolower y-.'' '''

```

This matches (-:) against the "flip" (|.) the lower-cased argument without (-.) any spaces.
Applying this to three arguments and returning "1" for true and "0" for false:

```
   palincheck&>'Able was I ere I saw Elba';'Step on no pets';'Not palindrome'
1 1 0

```

It's initially hard to get used to programming so succinctly at such an advanced level but you may find that it grows on you, especially if you like to try out ideas quickly.