What to learn after PHP? Scala or Clojure?

Viewed 16340

I have a heavy web dev background with PHP. My reasons for learning a functional programming languages are:

  1. to improve my programming skills. It was heavily suggested that learning a FPL helps. this has high priority because I want to be better and better.
  2. learn a general purpose programming language to solve tasks like scripting (OS scripting, text manipulation etc..)
  3. to be used as an alternative for PHP in web development.

Also which has the better community support, tutorials and books and the better web application framework?

Feel free to suggest other languages.

17 Answers

While it gets less press coverage than Clojure and Scala, I'd really recommend you to take a look at Fantom: http://fantom.org/

It's like the best of all both worlds and really should deserve more attention.

Though Scala is my favorite language for now, i think it's not the best choice to learn FP. It's mainly OOPL with good support of FP. I would suggest to start from Haskell to quickly dive into FP. You will learn how the following concepts of FP work (which are not just supported, but enforced and ubiquitous in Haskell): 1) powerful static type system with type inference 2) lazy evaluation 3) side-effect free computing

After dynamically-typed "pragmatic" PHP and pure functional "academic" Haskell you will have quite full picture of programming languages landscape.

May not appear so fancy, but I strongly suggest JavaScript.

A lot of years ago I was strong at PHP development, but then switched over to Java, C#, C, Objective-C. During my Java time I stepped deeply into JavaScript and did some pretty cool things with it. Someone I know developed an entire client-side temporary lightweight DBMS. Just have a look at Ext.js what they do with JavaScript. It's so underestimated, but doesn't deserve it. I suggest you google for "Douglas Crockford Video". At Yahoo he has created several excellent presentations about JavaScript, also I suggest you get the book "Javascript - The Good Parts" from Douglas Crockford, and "JavaScript - The Definitive Guide". Both the best JavaScript books available. And you'll be amazed what's possible and what a beautiful language it actually is. In fact, you can do AI with it, it has Lambda, there's actually nothing really "cooler" than that! What a pitty it's only used for clientside scripting. Few people know JavaScript can be used for serverside programming as well, but that's really rare / not well documented.

And thanks to Adobe Air you can bring JavaScript to the Desktop.

It would be an optimal addition to your PHP knowledge. It's always good to do related stuff. You can be the best Web Developer, or the best Desktop Software Architekt. But our brains are too slow to grasp all proffession needed nowadays to be the Guru in multiple directions. Beeing the Guru is essential for success, I think. Some friends of mine just do one thing: Beeing the Guru. They study their entire life one small subject and are extremely successful. They earn 5 times as much as any I-can-do-it-all-but-know-just-5%-in-this-topic-Developer in a quarter of the time only.

So I also suggest: Write a 600 pages PHP book before you forget your PHP knowledge while doing something totally different.

I did forget almost everything I knew about PHP and JavaScript, but in those early days I definitely was one of the expert guys who showed others a lot of stuff. Now it's a pain I have to ask so many basics again to recall them in my tiny brain. By writing your book, you'll recall your PHP expertise very fast even after a few years of doing something different, because it's your book, fitting your brain, from your brain. And you'll not loose your PHP-expert status even after several years of doing something else.

Good luck.

Related