I'm getting excited about the prospect of Silverlight, the DLR, and using Ruby with .Net. So, I've decided to start getting familiar with Ruby, and found a book online that promised to do just that, Why's (Poignant) Guide to Ruby.
So far it's an easy enough read. I haven't wept yet, as promised in the intro, but it's early still.
In the 'Parts of Speech' chapter Why is going through the elements of the language, describing how they look and work. I can appreciate how Why tries to demonstrate how fluid the language is by encouraging the reader to say some of the statements out loud, it worked nicely.
Although "You've got to be kidding me." is the only thing I've actually said out loud. I just got to the section on Block Arguments and had to read this passage a couple times before I was convinced that I wasn't seeing things: (emphasis mine)
Block arguments are used at the beginning of a block.
{ |x,y| x + y }
In the above example, |x,y| are the arguments. After the arguments, we have a bit of code. The expression x + y adds the two arguments together.
I like to think of the pipe characters as representing a tunnel. They give the appearance of a chute that the variables are sliding down. (An x goes down spread eagle, while the y neatly crosses her legs.) This chute acts as a passageway between blocks and the world around them.
I mean, is that really necessary?
But seriously, I thought it was strange that he starts the chapter talking about the parts of speech and how the language 'reads' and moves directly into describing how it 'looks'. I especially thought the description of curly braces ( '{' & '}' ) when they enclose a Block as giving "the appearance of crab pincers that have snatched the code and are holding it together" as silly, and a bit childish. Although, now that I've made a fuss about it, I'll definitely remember it.