10 Things Every Java Programmer Should Know About Ruby

Ruby Code (?)

require 'two'

x = 1.5 + two
puts x
printf "%d", x
def two
  2
end

Output

3.5
3

So what makes a language type safe?

  • Compiler knowledge of the variable types?
  • Declaring all variables?
  • Compiler catching all type errors?

Or…

  • Catching all inappropriate operations on a type, either at
    • compile time, or
    • run time