Sunday, June 1, 2008

What's different about Ruby

From: Desert Code Camp 2008
Speaker: Logan Barrett


Ruby is a dynamic language.

IRB is a psuedo acronym that stands for Interactive Ruby.

Ruby has strong typing - you can't cast a string to an int.

Testing is emphasized in Ruby and built in.

Duck typing in Ruby replaces what an interface in C# would be used for.

Everything in Ruby is an object.

The method-missing method is a method that will catch any call to a method on an object that is missing. i.e. if a method hasn't been declared for an object then the method-missing method will be called.

A lambda function in Ruby is called a code block or just a block.

A block is typically used to iterate over a collection like a for or foreach loop in C#.

collection.each do |element| # iterates over all elements in the collection collection. do |number|
collection.each_with_index do |element,index|

No comments:

Post a Comment