cat life | grep experiences > blog
Ruby
The Worlds' easiest "Hello, World" app.
31500 days
by Kaustubh Padegaonkar
in Ruby
I just started learning Ruby, with a lot of egging by my brother. And these are my first baby steps in the world of Ruby
puts "Hello, World!"
Yup, that is a Hello World code in Ruby. No main methods, semi-colons, or returns.
Ruby is a type-less, dynamically typed language.
Duck-typing As coined by Alex Martelli : “If it walks like a duck and quacks like a duck, I would call it a duck.”
We are more concerned with the aspects and methods of the object than the type of the objects. In Ruby, I will create a function, and accept an object and send messages to it. If that object does not have the above methods, then a run-time error will occur.
Nice Huh?