Why do you use an "other" language?

I started writing code many years ago in Basic, then QBasic, then VisualBasic6.
I took a brief look at ColdFusion, and I’ve written a little Perl and also some Java.
I eventually found PHP where I’ve been for quite a while.
More recently I tried Ruby (on Rails) and I’m now on the verge of trying Python.

As you may have guessed, I enjoy exploring coding languages. To me it seems that once they’re mature, (interpreted vs. compiled aside) they all pretty much do the same type of things, only using different syntax and construct.

So my question is, except for when it’s a job requirement, why do you use a particular language? Is it something you just “fell into” and liking it stay with it? Or do you think that the language has certain strengths over other languages eg. better IO handling, more extensions, less leakage etc.

Like Ruben K. above me, I also prefer Python over PHP. I started off learning with PHP at a very young age. I wish I had started of with a mush stricter language and then learn PHP. All it has done is taught me back practices. But nonetheless, I still love the language.

PHP is very, very bad when it comes to naming of a number of pre-built functions. Sometimes they decides to use ‘_’, ‘-’ or just concatenate it directly. Sometimes even the arguments within functions do not share the same consistencies, such as the occurrences of needle and haystack arguments. But at the end of the day, this does not matter too much, because my IDE is half decent =)

Personally I prefer Python because I love solving mathematical problems and equations. This proves much quicker to implement in Python, both in execution time and development time.

I really prefer python due to it’s syntax: it’s very unique and easy to read.

Some features of python that I like:

  • There is only ONE way of writing code due to strict indenting; This prevents the whole same-indent mess that spaghetti languages like PHP, .NET comes with, every python script is perfectly readable because the indents are in the right place. Because they have to be.

  • Writing less; This may be a side-effect of the strict indenting, you don’t have ending accolades (saves you a million lines, literally) and you don’t need ; (which saves you one character each line)

  • It’s multi-purpose; You can build websites with it, command line apps (php’s cli is not REALLY a good cli development tool as it’s still reading scripts from top to bottom due to it’s design) and even full GUI apps

  • VERY object oriented; Everything is an object :slight_smile:

Unfortunately, most projects I do still require me to program PHP :frowning:

Hey, that sounds familiar :slight_smile:

As far a imperative languages go, I agree, but when you take functional and logical languages into account it becomes a whole other story :slight_smile:

I use PHP (or rather “stick to PHP”) because it’s the most common language out there and almost any hoster supports it. If this weren’t the case I’d happily switch to a more compact language with better (and for me more intuitive) array handling like python or ruby.
I love to toy around with arrays but PHP is not really a good language to do that in.