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

You can mostly get the shapes of type-safety you'd typically expect to save you from yourself by being diligent about type specs and enabling:

  -Wunderspecs
  -Wunknown
  -Wunmatched_returns
  -Woverspecs
  -Wspecdiffs
And depending on a whole slew of things that may or may not make this useful, or more likely tractable for your codebase, you can enable this to track down some shapes of race conditions:

  -Wrace_conditions
The part where there's still a hole (now that most of the hole around Maps has been plugged) is in the message passing semantics. You can be conventional about how you write an API around the message passing to alleviate this, but there's still nothing stopping any random process from sending any shape of data to any other random process and thus essentially breaks Dialyzer's ability to enable static type checking through all paths. But as long as you have a catch-all matching clause implemented that dumps anything that doesn't explicitly match one of your types you're mostly fine.


Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

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

Search: