From: Christian Neukirchen Date: 2006-07-14T05:47:16+09:00 Subject: Re: Why Ruby over Python? Stefan Lang writes: >> > Consider Rake/Rant syntax: >> > >> > task :a do >> > ... >> > end >> > >> > task :b => :a do >> > ... >> > end >> >> I haven't done much with Rake yet, but fortunately I knew that => >> is used to indicate that one task depends on another. I wonder how >> many people who didn't know Rake would guess that. > > You have to learn *any* syntax/API. Important is that it's > easy to remember and that you don't have to write unnecessary > code each time you define a task. In Python this would > probably be done like this: > > def fun_a(): > ... > > task("a", fun_a) > > def fun_b(): > ... > > task("b", "a", fun_b) > > Having to define the separate functions fun_a and fun_b > is an unnecessary burden for the programmer. Having to > invent those function names gets tiresome. And I don't > see how that would be any clearer than the Ruby version. I can think of a syntax that is far easier. ;-) a: stuff to do for a b: a stuff to do for b -- Christian Neukirchen http://chneukirchen.org