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

Nah, a good API doesn’t push the conditionals down. You don’t need to pass a union to let the user decide, you just need to present an API for each (including a generic implementation that monomorphizes into multiple concrete implementations) https://matklad.github.io/2023/11/15/push-ifs-up-and-fors-do...


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

Search: