Hacker News new | past | comments | ask | show | jobs | submit login
Dtype_dispatch: a macro that defines macros that define enums and match them (graphallthethings.com)
15 points by mwlon 18 hours ago | hide | past | favorite | 2 comments





this is an obvious case of battling the type system that just gets in the way. The "before" version obviously sucks, but the "after" with magic sprinkled in - sucks even more! is there an alternative solution?

I dont understand what's going on but it looks like a hack to avoid code duplication. We should be OK with duplication sometimes because it's more explicit and straightforward to mingle and debug.



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

Search: