9 Oct 2006 (Mon)

11:06:52 # Life After 1 month of playing with ruby. Since I've picked up apt-listbugs, I'm intensively working with ruby, and gained some experience. There are few things that I like about ruby, and few things that I hate. First, the good points. Exception processing is good. Block format is good, looks better than the lisp counterparts. irb is a very useful tool. Then, the bad points. There are too many undocumented when I look up with ri, and there seems to be multiple documents, and none of them covers all; and I need to look into the source-code to obtain basic information like what does this method return, and what exceptions this method gives. net/http, http-access2, and soap4r have incomplete implementation for http (such as proxy authorization and http redirects). It's not completely unusable, but not an utopia. At least it has some promising future.

As for block structures, I like this syntax.


method.something { |var1,var2| 
  XXXX
}

in method you'll do:
	  yield val1, val2

	

And for exceptions, it's good and simple.

begin
  XXX
rescue =>exception
  XXX
  retry if XXXX
end
	
Junichi Uekawa

$Id: dancer-diary.el,v 1.91 2006/06/15 15:14:10 dancer Exp $