3 ms·
So why not static with the ability to ignore hinting or similar? C# does this. I think function definitions should be statically defined, but the actual body
by hsbauauvhabzb 4y ago
So why not static with the ability to ignore hinting or similar? C# does this.
I think function definitions should be statically defined, but the actual body of a function could easily stay largely dynamic.
- gilch 4y agoI do think that's helpful compared to the strict alternative, but much of the up-front cost is still there. You still write most things twice, and the static type checker still slows you down when prototyping. You'd still be tempted to write bad code to work around the insufficiently-expressive type language, rather than write it in the most natural way, and only give up when it's too hard. You can also approach this from the other direction: why not start with a dynamic language for the rapid prototyping and gradually introduce typing as the code stabilizes? Python and Typescript do this.
- still_grokking 4y ago> You'd still be tempted to write bad code to work around the insufficiently-expressive type language, rather than write it in the most natural way. […] Could you provide any evidence for the claims that one needs "workarounds" and can't write code "in the most natural" way in a statically typed language? > You can also approach this from the other direction: why not start with a dynamic language for the rapid prototyping and gradually introduce typing as the code stabilizes? Python and Typescript do this. Which obviously does not work, which is the whole point of this submission and discussion thread…