My first programming language in school was C. Then I learnt C++ and Java and got stuck with Java for 2 yrs. I was so addicted to java and OOP at first. I started making Java applications and became fully thorough in OOP.

Now I would like to learn different languages. My mind is full of C style syntax. Sometimes in my dreams, I see camelCase words and paranthesis and braces and dots. Even JavaScript uses C like syntax.

I want to get adapt to different languages so that I won't find difficulty when I get a job that requires me to program in different syntax and different paradigm..

I do not know what functional, logical, hybrid paradigms mean. So I am asking here. Suggest me a different language (and some good book on it if possible) to learn..

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. More info: help center.

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
If this question can be reworded to fit the rules in the help center, please edit the question.

10

Do not learn languages, they're all irrelevant and unimportant. Learn paradigms and fundamental theories - then you'll be able to easily recognise them in any particular language you bump into.
–
SK-logicSep 14 '11 at 8:00

11

@SK-logic: although a judicious choice of languages leads one to naturally learn those paradigms and fundamental theories!
–
Frank SheararSep 14 '11 at 8:40

The site says, "This guide is meant for people who have programmed already, but have yet to try functional programming" which means this is what I want. Thanks a lot!
–
VigneshwaranSep 14 '11 at 12:20

1

UPDATE @Michael Burge: 2 weeks after following your suggestion, I'm halfway(7/14chaps) through this reference. WOW!! Other than different syntax, this language changed my programming mindset totally. No for-loops, lazy evaluation, and especially passing functions as parameters were all amazing! More to learn.. Came here to thank StackExchange community.
–
VigneshwaranSep 27 '11 at 14:15

+1 to Clojure. You get all the benefits of a modern language (hashmap and vector literals), with the simplicity of the LISP syntax, and the power of a functional language. Clojure revolutionized the way I think about programming.
–
Timothy BaldridgeSep 14 '11 at 13:32

Inform7 is the most awesome programming language ever. It is only useful for one thing -- writing text-based games -- but what it does, it does very well. Programming in Inform7 is unlike programming in any other language I've ever tried. A typical line of Inform7:

Before wearing something which is not carried by the player: if the noun is worn,
continue the action; try taking the noun; if the player does not have the noun,
stop the action.

This implements the logic that if the player tries to wear something that they are not carrying, they logically have to pick it up first. If picking up the object fails, (say, because it can be seen but not touched because the hat is inside the closed aquarium) they don't get to wear the object.

Or:

The initial appearance of a door is usually "Nearby [an item described] leads
[item described direction]." The description of a door is usually
"[if open]It stands open[otherwise]It is closed[end if][if locked]
and locked[otherwise] and unlocked[end if]."

This logic says that when the player sees a door, it is first described as something like "A drawbridge leads north. It stands open."

There's always Forth, which isn't as high-profile/visible as it once was but is still very common in certain fields. It's certainly not C-like :)

Someone has already mentioned Lisp, but I'm going to suggest that Scheme may be a better choice for a Lisp-like language. It's been the language for lots of Computer Science programming courses for years, so there's a lot of tutorial material around for it.

The book of Abelson / Sussman ("Structure and Interpretation of Computer Programs") is the best book I know of to learn different programming paradigms. They use Scheme (an easy to learn Lisp dialect) throughout the book, which is definitely not "C-Style" or OOP. See here http://mitpress.mit.edu/sicp/ for more information.

My favorite functional programming language so far is ML. However, I'd only suggest it for purely academic learning about other syntax/functional programming languages; I seriously doubt you'll ever have a job that requires you to use ML.

As for multi-paradigm languages, one that's gaining popularity (but that I've never used personally) is Scala. You should be able to pick it up fairly quickly because it runs on the JVM, so your experience in Java will be a plus.

Like C++, Python has a powerful metaprogramming capability; but unlike C++, metaprogramming is done in Python, not as separate, cumbersome syntax like templates or macros.

Like Pascal, Python is easy to learn; but unlike Pascal, Python is not just a toy language.

Like Java, Python is strong on OOP; but unlike Java, Python doesn't come with the hefty, unnecessarily verbose syntax.

Like Bash/Perl, Python can be used to write quick scripts; but unlike Bash/Perl, Python can actually scale to larger program.

Python has strong facilities for functional programming (map, filter, reduce, composition, lambda, list comprehension, currying, lazy evaluation, etc), but does not restrict you to functional paradigm. You can freely mix and match paradigm as you see fit to solve a problem. And unlike many dedicated functional language, Python is actually used in the industry.

Best of all:

>>> from __future__ import braces
File "<stdin>", line 1
SyntaxError: not a chance

You already seem to have quite some programming experience. Grasping high level concepts about new languages shouldn't take you too long. I suggest just toying around with several in order to see whether there are any you find particularly interesting. You can still buy a book to learn it thoroughly afterwards.

I guess the best bet to pick languages which are useable in the industry is by going through some job offers and checking their requirements. This will also give you an overview whether the type of job where the language is used interests you.

Of course, a problem with this approach could be that mainstream jobs only offer jobs in OO languages, but hey, .. then at least you know. ;p

Prolog was fun, though I didn't get to use it for very long. It is a "declarative" programming language, which basically means you tell it your problem and it works out how to solve it: the order of the statements is irrelevant...