There is an interesting discussion going on on the Agile-Testing Yahoo Group right now, about the differences between Python and Ruby.
It is oddly reminiscent of conversation I’ve had a dozen times recently – about the advantages of Ruby Vs. Perl. All of the old-school computer scientists are saying that there isn’t much difference, while the newbies who don’t know Python (or Perl) believe it’s the Cat’s Meow and the New New Thing.
I just put out a post with my two cents, which I will repeat here:
I was talking with a colleague about this and he pointed out that in Ruby you don’t need semi colons at the end of lines or parenthesis around function calls.
So, instead of this kind of thing (this example is in perl):
CookMeal(“Eggs”, “Ham”, “Bacon”);
You can write this:
CookMeal Eggs, Ham, Bacon
—> To a computer scientist, this looks like BASIC – junk made up for 6th graders to learn programming, not real computer science. We cry out “Give me your strong indentation requirements and clear end of line parsers! Give me Python or Perl or C++!”
Yet – to a customer who is defining acceptance tests, the second example looks a lot more like the English language and less like a magical incantation.
And that, I honestly believe, is the major reason to that DSLs for customer acceptance testing are more popular in ruby than in python.
Note – To get rid of the quotes, you’d have to define an enum type, which you ‘could’ do in any language …