Sunday, January 17, 2010

Is anything new/unique to Python?

Looking at haskell I see some of my friends from python. Significant whitespace, list comprehensions, interators (sort of like laziness), tuples. And then it struck me that all of these features in python are derivative. Not that that is a bad thing. But I was surprised that I couldn't think of anything definitively new/unique to python. (Obviously the way these things are combined/balanced is unique)

Hey, internets, did python invent any language features/syntax?

The only thing that I can come up with is maybe the __blah__ (unders before and after) style of exposing syntax overriding.

Monday, January 4, 2010

One New Language a Year: Haskell

Another year starts and so I try again to do the "Language a Year" thing. Last year it was a close decision between smalltalk and haskell. I went with smalltalk and for various reason it didn't really grab me and I ended up abandoning my efforts and switching to emacslisp.

So hopefully I've learned a little bit about the focus and dedication it takes to work on a new language and I'm ready to try this thing again.

First of all you need a goal or you won't know if you've succeeded (or failed). My goal is to essentially have a new python at my command. Another general purpose language that I can use as easily as I think for any sort of programming itch I happen to have. I originally learned python because I was looking for a new language that was different from what I was using at work. In 2000 or so I was mostly a Java and perl programmer. Python seemed interesting and different so I dove in. Relatively soon after that it became my full time work language and I sort of lost the idea of having a second language that I used in my free time.

So here I am again looking for a "fun" language. I've actually done occasional reading on haskell topics/blogs and have gone through a few short tutorials, but it's hardly a language I would say I'm at all comfortable in. In fact, unlike most languages that I have some familiarity in, random haskell code more often than not seems to have some scary new function/datatype/etc that I can't even start to grok from context.

The metaphor I have in mind as I dive in is that just as a professional builder uses tools that would be confusing and dangerous to a amateur builder there are programming tools/languages/concepts that are a level of effectiveness above the blub that I'm used to. It will take time/energy to master the more powerful tools but once you have, you will be working at a more advanced level.

I'm really curious to see if I can get a new language in my tool belt that is as concise (or more so) than python, faster, less prone to bugs, etc. Haskell seems as likely to provide this as any language as I'm aware of.

My plan is to use "Real World Haskell" as my main resource. By the end of the year I'd like to have gotten comfortable enough that I could use it interchangeably with python for random fun projects at home and even better to create a project and/or get involved in an existing project so that I have a reason to keep my skills fresh (since it ain't too likely to become my work language any time soon).

In any case I'll check back in a month or so and let you know how it's going.