Things I Was Wrong About: Types
A lot of people in the comments are saying how they started off in Java, or C, and hated types, but eventually grew to love them.<p>I started off in PHP. It was wild. Anything could be anything. Refactoring was a nightmare. Our codebase was littered with mystery variables like $hold, $hold1, and $holda, which were re-used all over the place. (Granted, this two other problems entirely orthogonal to types.)<p>Then I got a job at a Java place. My god, it was beautiful. I could suddenly <i>know</i> what arguments functions were expecting, even if I hadn't seen them before. I could be instantly aware if I was trying to use the wrong variable somewhere, or pass in invalid data.<p>It was as if someone lifted me out of a dank cellar where I had previously subsisted on whatever mushrooms the rats didn't deign to eat, into a brightly lit dining room full of steak and pastries.