3 ms·
I don't know much about Ruby, I will admit. But dynamic typing is terrible for large code bases. The only place I allow it is at the very edges of our system,
by douche 12y ago
I don't know much about Ruby, I will admit.
But dynamic typing is terrible for large code bases. The only place I allow it is at the very edges of our system, where we are transforming the proper types of the internal system into POD-objects to be serialized and returned to the JS/HTML front-end. I'm not willing to give up the compile-time safety of breaking the build if someone inadvertently assigns a string to a number, or an object to a primitive in code that they check in, in place of unit testing that, odds are, will be incomplete or otherwise broken and won't catch the problems that static typing catches.
- vinceguidry 12y ago> But dynamic typing is terrible for large code bases. Yes, you can get into a lot of trouble very quickly as your codebase grows if you don't have a heavy security blanket. But the more Ruby I write, the more typing looks like Linus from Charlie Brown's blanket. Because you don't need a monolithic code base any more. You can break it up into smaller pieces that interact with each other using POD objects. When I start to have type problems in Ruby, I start looking around for a domain concept that I need to extract into a gem. The codebase never grows to a point to where it becomes a serious problem.