3 ms·
Yup. I just spent 2 days refactoring and extending some swift code. It had no tests, so I threw some together quickly before I started, and it's a good thing I
by b_t_s 10y ago
Yup. I just spent 2 days refactoring and extending some swift code. It had no tests, so I threw some together quickly before I started, and it's a good thing I did because they did fail two or three times, however I'd say better than 95% of the time I was dealing with type errors. Having written a fair bit of ruby, most of those type errors would have been crashes and at least some percentage worthy of unit tests. Even then I probably would have missed some that only happen given the right input. Letting they compiler catch those mistakes is a lot easier and more reliable, and with a modern type system it's hardly any more code/effort than just writing untested ruby, plus it's self documenting to some extent.