5 ms·
Typically in Ruby (which is heavily Smalltalk-influenced) we do ad-hoc type annotations anyway and call it documentation. So you've got the camp that favors ty
by cout 5y ago
Typically in Ruby (which is heavily Smalltalk-influenced) we do ad-hoc type annotations anyway and call it documentation.
So you've got the camp that favors type annotations for various reasons and the camp that is opposed. There is also a third camp: the DBC (design by contract) camp. Their argument is that type annotations don't go far enough and that's what you really need is to enforce preconditions and postconditions. While I see their point, I think DBC lacks a "killer app" -- which as you pointed out, for type annotations, is static analysis (which leads to tools like code completion, refactoring browsers, performance improvements, and more).
- dgb23 5y agoOne „killer app“ for these is interactive programming with instrumentation and generative tests: https://clojure.org/guides/spec https://clojure.org/guides/spec
- rbanffy 5y ago> I think DBC lacks a "killer app" If Ariane 5 carried astronauts, it'd certainly be a killer app: https://ieeexplore.ieee.org/document/562936 https://ieeexplore.ieee.org/document/562936