News for hackers. Stuff that matters.
Re:What is type safety? by tel on Tuesday August 05, 2014 @01:06PM (#8138002)
In the context of this article that's just confusing the issue. "Type" is both well-defined and not the same as "type" in a Ruby context.
Re:What is type safety? by ionforce on Tuesday August 05, 2014 @02:15PM (#8138423)
What is type in a Ruby context?
Re:What is type safety? by tel on Tuesday August 05, 2014 @03:39PM (#8138870)
Usually in a Ruby context you'd refer to something like Fixnum or String as types when really that's their "class"

    irb(main):005:0> 3.class
    => Fixnum
Such a "type" doesn't have much to do with "types" as discussed when referring to static types. They're simply orthogonal concepts.
Re:What is type safety? by mnarayan01 on Tuesday August 05, 2014 @04:47PM (#8139306)
The result of the #class method does not _fully_ encapsulate an object's type (e.g. #extend, #define_singleton_method, etc may have been used to modify the object's type) but every Ruby expression does have a type in exactly the sense as used when talking about static typing; the only difference is when you can (in general) determine that type. The #class method is not orthogonal to type, it is merely incomplete.
Re:What is type safety? by tel on Tuesday August 05, 2014 @05:07PM (#8139434)
Sure, but that's not really relevant. All of your "typing" occurs at runtime and thus is entwined in the language dynamics and not its statics.