Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

    void doSomething(String a) {
        // Do something 1
    }

    void doSomething(Integer a) {
        // Do something 2
    }

    doSomething("1");
    doSomething(1);
That's the sort of thing they mean by types don't change how programs behave. You can't easily change or remove the type system because it's tightly coupled with method resolution. If you have an optional type system, the evaluation semantics of the language cannot depend on the type system because you don't want the program to do something different if you are/are not using the type system.

The fact that type errors are only manifested as warnings is a (perhaps odd) design decision, but it doesn't stop them being type errors. They could just as easily made them errors, and String a = 1 would give a compile time error.

Hopefully they'll be a 'warnings as errors' flag for those of us more used to type errors being compile errors.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: