Re:When to Use TypeScript – A Detailed Guide Through Common ...
by seanmcdirmid on Sunday April 07, 2019 @05:49PM
(#19600137)
Though you have a point, writing down type annotations can seriously slow you down when you are doing exploratory (prototyping) programming. It can also make your code less readable as the annotations can get in the way of the logic you really care about (easily fixed in an IDE, but people want to still use notepad to edit/read code). Then there is figuring out what the annotation should be in the first place, again easily enough automated in an IDE but the notepad problem remains.
[ Parent
| on HN ]
Re:When to Use TypeScript – A Detailed Guide Through Common ...
by james_s_tayler on Sunday April 07, 2019 @08:33PM
(#19600964)
What usually slows me down about dynamically typed code is you have some variable returned by a function only denoted by var myVariable = myFunction(); and I'm sitting there staring at thinking... "what are the contents of that variable? what properties do I have access to on that object? what can I do with it?"
And figuring that out becomes a massive time suck when that's a constant across an entire code base. Statically typed stuff means I can very quickly find that out even if it's the first time i'm exploring that particular area of the code.
Re:When to Use TypeScript – A Detailed Guide Through Common ...
by seanmcdirmid on Sunday April 07, 2019 @08:59PM
(#19601081)
I agree, in a type inferred language or a language where annotations can be supressed, this is just another matter of IDE affordable.
Some dynamically typed languages support type annotations that are only enforced dynamically; Julia is the primary example of such a language ATM.