Ragged Clown

It's just a shadow you're seeing that he's chasing…


Dec
1
2010

Deal with this

I’m trying to learn Objective C at the moment so I can write my first iPhone app (this time next year, we’ll be millionaires).

Objective C is just about the ugliest language that I have ever come across (and I have coded in COBOL and Ada).

That makes it all the more frustrating to read the trailer for the new version of Ruby.

  suits = %w{ C D H S }
  ranks = [ *’2′..’10’, *%w{ J Q K A } ]
  deck = suits
  .product(ranks)
  .map(&:join)
 
  hands = deck
  .shuffle
  .each_slice(13)
 
  puts hands.first.join(“, “)

Could it be any simpler?

(I don’t know what the ampersand thing does either).

It’s hard to believe that my beautiful iPad is full of nasty Objective C.

Tags:

2 responses to Deal with this

Jeffrey Fredrick December 2, 2010

I found Objective-C easier to swallow when remembering that the contemporary alternative was C++.

Jtf

Matt December 4, 2010

Looks elegant in the Perl sense. No thank you.

Makes me feel better about not finding more time to play with Ruby, though.

Leave a Reply

Your email address will not be published. Required fields are marked *