4 ms·
In virt-v2v we eventually enforced that every module file also has a corresponding interface file: https://github.com/libguestfs/virt-v2v/blob/master/check-mli.
by rwmj 4y ago
In virt-v2v we eventually enforced that every module file also has a corresponding interface file: https://github.com/libguestfs/virt-v2v/blob/master/check-mli.sh https://github.com/libguestfs/virt-v2v/blob/master/check-mli...
- IshKebab 4y agoProbably if you need to do that it should just be enforced by the compiler. It's pretty clear to me (and the author of this post) that Rust got this right - small scale type inference is fine (in function bodies) but you really want explicit types for functions and up. Without that, you lose out massively on readability and error message quality. In Sail, I have IDE type inlays working but it barely helps with reachability because half the types are inferred as generic.
- rwmj 4y agoAs a user of OCaml I have to disagree. Rust requires far too many type annotations and they are mostly unnecessary and clutter everything up (particularly with it's very heavy syntax). In OCaml my editor shows me types if I mouse over a variable, and if I need to document the code I can add annotations, but that is rarely needed.
- IshKebab 4y agoMy point is it isn't very useful if half the types are 'a