top | item 36516443

(no title)

dsQTbR7Y5mRHnZv | 2 years ago

I find it helps to think about it like this:

Whether you specify them or not, the data moving around your application _has_ types.

Strings, ints, booleans - they're all there. You're just keeping that information in your head while you work.

By writing them in the code, you're simply offloading all of that and saying "I trust the computer to validate this better than I can." Which is exactly the kind of thing we should be trusting computers to do. They won't forget what type something is 5 function calls deep and they won't get tired from lack of sleep.

I know I prefer having the computer tell me I made a mistake while I'm developing something rather than a user emailing me after I've shipped it.

discuss

order

irrational|2 years ago

Sure, I just have no idea how to write them, what the syntax is, where to write them, etc. Since my work doesn’t care to give me time to find out, and I don’t have time to do it on my own, it isn’t going to happen until it becomes a priority at work.