2 ms·
Isn't ruby strong and dynamic?
by veidelis 3y ago
Isn't ruby strong and dynamic?
- ninkendo 3y agoThere's no type annotations (outside of experiments), and thus no way for a "compiler" step to tell you if you're passing an array to a function that expects a string or something. The "strong" typing doesn't happen until runtime, so the closest you can get to this is writing a unit test that asserts on the behavior you want (assert that this method raises an exception when I pass an array, etc.) This is what people mean by "typed languages". Ruby isn't one of them.