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

I think he meant that MyType is an enum and New is a user-defined function with a huge switch that does allocate (with placement new?) the correct type based on the value of MyType. Yea works, but introduces runtime overhead and is the gate to maintenance hell.


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

Search: