Hacker News new | ask | show | jobs
by properparity 1194 days ago
That is something a decent type system should solve - make it impossible to pass 'incomplete values' on, so any state further on which depends on the error handled/not handled will expect the appropriate type and compiler will error at that call site.

An unused variable means you weren't passing it on anywhere so there is no code which depends on its value, so how can it be a bug?

future = x.do_async(); return;

should not error out because of 'unused variable', it should give a error message concerning the lifetime of the future object.