Dismissing programming languages

by baxter on Thursday, 19th June 2008 at 22:42 2 comments

Jeff Atwood recently posted on his blog about the Wide Finder project, a project that Tim Bray initiated to discover if we can write parallel applications without significantly altering the way we write sequential applications. The project is interesting but, unfortunately, that’s not the subject of this post. I suggest if you are interested you go check it out.

As part of the original Wide Finder project Tim Bray used a naive Ruby implementation as a specification for the project:

counts = {}
counts.default = 0
 
ARGF.each_line do |line|
  if line =~ %r{GET /ongoing/When/\d\d\dx/(\d\d\d\d/\d\d/\d\d/[^ .]+) }
    counts[$1] += 1
  end
end
 
keys_by_count = counts.keys.sort { |a, b| counts[b] <=> counts[a] }
keys_by_count[0 .. 9].each do |key|
  puts "#{counts[key]}: #{key}"
end

It’s not the most penetrable code I’ve ever read! But most of this is thanks to the regular expression, and that would look the same in any language.

Jeff quoted this code snippet in his post, alongside this remark:

Tim calls Ruby “the most readable of languages”; I think that’s a bit of a stretch

Unfortunately, most of the commenters are people that have picked up on this digression and decided to chime in with their reasons for disliking Ruby. Jeff never said he disliked Ruby, of course, but plenty of people seem to be agreeing with him that Ruby sucks.

As you might know I’m a fan of Ruby so I’m hardly an impartial observer, but what frustrates me is that a programmer can so easily dismiss any programming language.

It’s true that Ruby does not have any new features; it takes object-oriented elements from Smalltalk, functional programming from Lisp and syntax from Perl and Python. The syntax might not be C syntax, as many commenters seem to wish (as though this were an objective worth pursuing!!), instead it is designed to capture the essence of the program, rather than forcing you to go to unnecessary lengths in order to perform simple tasks. (Thanks to Ola Bini for putting this so eloquently!)

The ease with which so many people can dismiss a language like Ruby offends me. In a sense programming languages are like an ecosystem. While one language flourishes other languages compete and develop on the fringes, until the climate changes and suddenly, for one reason or another, the fringe language is more preferable. While Java and C# might currently be the dominant languages, dismissing those languages on the fringes is, in my opinion, a dangerous thing for a developer to do. Who knows when the climate will change?