4 ms·
Haskell has a flag called -fdefer-type-errors (https://downloads.haskell.org/~ghc/7.6.1/docs/html/users_guide/defer-type-errors.html https://downloads.haskell.o
by neilparikh 9y ago
Haskell has a flag called -fdefer-type-errors (https://downloads.haskell.org/~ghc/7.6.1/docs/html/users_guide/defer-type-errors.html https://downloads.haskell.org/~ghc/7.6.1/docs/html/users_gui...) that gets you pretty close to the experience of ignoring errors you don't care about right now.
- twic 9y agoYou can do something similar with Eclipse's compiler for Java, JDT, which features [1]: An incremental Java compiler. Implemented as an Eclipse builder, it is based on technology evolved from VisualAge for Java compiler. In particular, it allows to run and debug code which still contains unresolved errors. That means that you can write something like: private void describe(String string) { if (string.isEmpty()) empty(); else nonempty(string); } private void empty() { System.out.println("empty"); } private void nonempty(String string) { System.out.println("contains " + string.size() + " characters"); } Then you can still run the code and call describe, but if execution reaches nonempty, you get a runtime error telling you about the compilation problem. It's one of the few things from Eclipse i miss when using IntelliJ. [1] http://www.eclipse.org/jdt/core/ http://www.eclipse.org/jdt/core/
- _pmf_ 9y agoAnd this has been working for a decade. It's one of the reasons I laugh in their face when a JS developer tries to sell his babel reload crap as progressive.
- exceptione 9y agoI can't see a problem with nonempty, am I stupid?
- Thiez 9y agoA `String` in Java has a `.length()`, not a `.size()`.
- twic 9y agoApologies! I meant to include a comment pointing out the error (as Thiez writes, it should be length, not size), but that somehow didn't make it into the comment as published. I blame my sub-editors, can't find the staff these days.