A few days ago 0xd34df00d has published the translation of the article, describing the possible information about some function if we use it as a "black box", not trying to read its implementation. Of course, this information is quite different from language to language; in the original article, four cases were considered:
- Python — dynamic typing, almost no information from signature, some hints are gained by the tests;
- C — weak static typing, a little more information;
- Haskell — strong static typing, with pure functions by default, a lot more information;
- Idris — dependent typing, compiler can prove the function correctness.
"Here's C and there's Haskell, and what about Rust?" — this was the first question in the following discussion. The reply is here.
Читать полностью »