2 ms·
Are there any languages that have a type mismatch warning rather than a type mismatch error? Something like how gcc warns about incompatible pointer types when
by Kliment 13y ago
Are there any languages that have a type mismatch warning rather than a type mismatch error? Something like how gcc warns about incompatible pointer types when compiling C programs, but lets you use them if you insist, but for all types?
- jeapostrophe 13y agoI suggest reading about progressive types: http://blog.brownplt.org/2012/09/01/progressive-types.html http://blog.brownplt.org/2012/09/01/progressive-types.html
- Kliment 13y agoWow, thank you, that is exactly what I had in mind
- enupten 13y agoA few implementations of Common-Lisp (like SBCL) do this already (not surprisingly), and I find it very useful to compile misbehaving programs (and having not being segfaulted upon). Once you verify function behavior with a bunch of test cases, you declare types everywhere in the code and set the compiler optimization to full.
- strager 13y agoGHC (a Haskell compiler) can defer type errors until runtime: http://ghc.haskell.org/trac/ghc/wiki/DeferErrorsToRuntime http://ghc.haskell.org/trac/ghc/wiki/DeferErrorsToRuntime http://www.haskell.org/ghc/docs/7.6.1/html/users_guide/defer-type-errors.html http://www.haskell.org/ghc/docs/7.6.1/html/users_guide/defer...