I need to learn a new Programming Language.
This is for two reasons.
In my time as a programmer I’ve learned and used; Basic, Ada, C, C++, VB, Perl and Java.
So that’s 7 (5 if you merge Basic with VB and C with C++).
It’s a reasonable amount, a little on the small side.
But that list is only half the truth; most of those languages I’ve not touched in years, some I’m definitely never going to touch again (Ada!).
The only ones I now use in any form now are Java and Perl.
I use Java in my day job and to write things like this site, and I use Perl for the odd scripting task.
My first reason for needing a new language is a pragmatic one. I need to learn a new scripting language.
I need a new scripting language because every time I go to do something in Perl I find I have forgotten how to do one of:
a, list the files in a directory.
b, pass an array to a function.
c, iterate over an array.
d. all of the above.
This is because I find Perl’s syntax to be on the whole inconsistent and unintuitive.
So, I’ve had enough of Perl’s kooky ways and would like to learn something a little bit more “sane” (definition: consistent and intuitive syntax).
My second reason goes a little deeper.
I’ve been reading a few articles and blogs of late that in some way or another point out some problems with Java.
A Quick Tour of Ruby
Java doesn’t provide a utility method for opening a text file, reading or processing its lines, and closing the file. This is something you do pretty frequently.
— Steve Yegge
Can Your Programming Language Do This?
Java required you to create a whole object with a single method called a functor if you wanted to treat a function like a first class object.
— Joel Spolsky
What was interesting was that once I was over my initial denial of such heresy, I found myself mostly agreeing with what they had said.
The surprising part for me was that I had not consciously noticed these things myself – even though I now realise such things had annoyed me at the time.
The reason that they had not bubbled up to the level of consciousness was that I could not see beyond the Java language itself.
Something was awkward to do in Java (ever tried reading a file?) – well, that’s just the way Java is.
I couldn’t question it, because I was so deeply ingrained in the ways of Java, I could see no alternatives.
This worried me somewhat, what other concepts and ideas was I ignorant of due to my Java mindset?
Sometimes you need to take a step back and get a fresh perspective on things.
And what better way than to learn a new programming language.
I’m a busy guy though.
I can’t simply afford to take two weeks off just to learn a new language.
So, to be pragmatic (I’m a pragmatic guy too) I’m going to try to solve both of these problems with a single language.
So, I want a general purpose language that’s also good for scripting work.
My shortlist of languages is not long:
I’ve dabbled with Python.
It’s fun, quick, easy etc.
I’ve not done enough to know if it’s “sane” as defined above, it doesn’t seem as freaky as Perl though.
Ummm, everyone’s talking about it.
A friend of mine is learning it and he’s not swearing about it too much yet.
Apparently it’s mostly “sane”.
I’ve not completely decided yet, I’m leaning towards Ruby at the moment mind.
Anyone care to convince me either way, or suggest other languages I should be looking at?