Is the Ruby Standard Library a Ghetto?
Created at: 22.11.2010 22:14, source: Ruby Inside , tagged: Controversy Miscellaneous
In The Ruby Stdlib is a Ghetto, Mike Perham argues that Ruby's "standard library" (all the libraries that come by default with Ruby installs) is old and crufty and suggests some parts that should be removed.
The Problem
In case you're unfamiliar with the term, the ever authoritative Urban Dictionary lists ghetto as, among other things:
an impoverished, neglected, or otherwise disadvantaged residential area of a city, usually troubled by a disproportionately large amount of crime
Anyone's who recently looked up documentation for stdlib-dwelling libraries has probably been a little frustrated. I see rants and raves from time to time on IRC and Twitter and I'm often surprised at how much isn't documented. Frequently, documentation advocates like James Britt will encourage people to start contributing documentation in an attempt to tidy up their own back yard, but the process is, IMHO, reasonably arcane compared to that of other open source projects.
A Solution?
Mike's suggests that we remove most of the substantial libraries, like Net::* (including the popular Net::HTTP), DRb, REXML, RSS, and even WEBrick, and to have them as separate, RubyGems-installable libraries.
I agree. Even forgetting the technical aspects, freeing these libraries from the clutches of the standard library and having defined maintainers (on, say, GitHub) could encourage more developers to engage with them, fork them, provide patches, and so forth, as we see with other popular Ruby libraries.
The sticking point? The "standard library" is called "standard" for good reason. You can install Ruby 1.8.7, 1.9.2, JRuby 1.5, or any mainstream implementation and expect to run require 'drb' successfully out of the box. Taking libraries out of the standard library would change this and, of course, require significant community agreement and discussion, not least from the Japanese Ruby high guard.
I applaud Mike for kicking off the discussion, though. In a year or two's time, we might get to look back at the discussion much as we can now look back at 2008's "No True 'mod_ruby' is Damaging Ruby's Viability On The Web" and breathe a sigh of relief.
