On Thursday, July 17, 2003, at 03:59 PM, Harry Ohlsen wrote:

> Every time I talk to someone about it, they seem to lump Ruby in with 
> every
> other scripting language and believe it's of no value for "real" work.

Ruby has some clear advantages in code generation. It's clean, easy to 
read, easy to maintain, and great at text and XML processing. It also 
has good text templating tools. Another advantage is that it is not the 
target language. So it's easy to distinguish the generator from what it 
is generating.

Take as an example the EJB generator we have in the book, in just a 
couple hundred lines we are able to build: SQL, Entity Beans, Stateless 
Session Beans, Data Transfer Objects, Deployment Descriptors, Test JSPs 
and test data loading code from a set of XML definition files.

Another nice thing about generators is that, generally, you aren't 
deploying them. So people don't have to worry about if the customer has 
Ruby, or how fast the Ruby code runs. So it's an ideal place to start 
with Ruby, and if you don't like it, you can always re-code the 
generator in something you prefer.

-Jack Herrington
  http://www.codegeneration.net
  Author of "Code Generation in Action" (Manning, July 2003)