3 ms·
> Static typing. It's like having a secretary who is doing all the writing, and you only have to think big things. It's a relief. Funny. I see this as exactly
by raverbashing 6y ago
> Static typing. It's like having a secretary who is doing all the writing, and you only have to think big things. It's a relief.
Funny. I see this as exactly the opposite.
To me static typing is a bureaucratic delay where you have to tell the computer what it already knows (but thank the deities for "auto" or the walrus operator in Go) and dynamic typing as the computer just doing what you tell it to do without bothering me with trivialities.
Yeah, maybe static typing makes the IDEs smart, but I dislike IDEs being "smarter" than compilers, I mean, the compiler should be the smartest one. If your IDE knows x is an int, why can't the compiler know?
- Smaug123 6y agoMaybe the computer can infer the types after you've written a correct program, but if you write down the types up front before you start the implementation, the computer will hold your hand while you implement. It sounds like you haven't used something Hindley-Milner based - I'd recommend giving it a go, so that you can feel what it's like. Much as Typescript gives you incremental typing over JS, so too does type inference give you incremental static specification of the types over the fully inferred program. When you don't need to write down the types, the inference engine gets out of your way; when you want to use the types to constrain the possible programs you could be writing, the inference engine puts up the guardrails to stop you making mistakes.
- DenisM 6y ago> if you write down the types up front before you start the implementation, the computer will hold your hand while you implement. This is exactly it. Thank you.