Re:Announcing TypeScript 2.0
by qwertyuiop924 on Friday September 23, 2016 @05:40AM
(#12563385)
Well, sometimes, which is why optional type signatures, like those in TS, can be useful. But even if you're not telling all the typing details, at least tell the world that your function works with strings, or whatever.
And if you're using the properties everywhere, yeah, define them, but if you need to extend an object, and the extension will only be used locally, than it's useful.
Ugh, no. I really don't want to be looking at code where properties appear after initialization and you have reason about when the damn thing is actually available, thank you.
> Also, in a well documented system, functions should note what types they except, even if it is just "any types that respond to these messages" in smalltalk, or your local equivalent
So, like specifying type signatures in Typescript, except probably out of sync because it's not automatically enforced?