Y
Hacker News
new
|
ask
|
show
|
jobs
by
Gadiguibou
940 days ago
You can also often encode those checks in the type system like in the Option example near the start of the article.
1 comments
RHSeeger
940 days ago
Assuming your type system is robust enough to support such things. That's not the case for many mainstream languages.
link
sfink
939 days ago
In that case, use DEBUG-only asserts. They're not foolproof (they're only as good as your test suite), but they're pretty damn good.
link