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

i wonder how hard it would be for their compiler to catch the opposite case, then - a program using the return value of a function without a return statement. i think that was my most common bug when i was doing javascript programming, because all the other languages i was using at the time had implicit returns.


Closure Tools will let you annotate your functions with a return type; their compiler will catch a function so annotated that lacks a return[0].

[0] http://sixlette.rs/snap/Closure_Compiler_Service-20121003-15...




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: