Re:The Anti-Human Consequences of Static Typing
by Kliment on Monday August 12, 2013 @04:32PM
(#6201616)
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?
[ Parent
| on HN ]
Re:The Anti-Human Consequences of Static Typing
by jeapostrophe on Monday August 12, 2013 @04:33PM
(#6201632)
I suggest reading about progressive types:
Re:The Anti-Human Consequences of Static Typing
by Kliment on Tuesday August 13, 2013 @03:43AM
(#6204473)
Wow, thank you, that is exactly what I had in mind
Re:The Anti-Human Consequences of Static Typing
by strager on Monday August 12, 2013 @07:05PM
(#6202809)
GHC (a Haskell compiler) can defer type errors until runtime:
http://ghc.haskell.org/trac/ghc/wiki/DeferErrorsToRuntime
http://www.haskell.org/ghc/docs/7.6.1/html/users_guide/defer...
Re:The Anti-Human Consequences of Static Typing
by enupten on Monday August 12, 2013 @05:32PM
(#6202154)
A 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.