Hacker News new | past | comments | ask | show | jobs | submit login

This is pretty standard "C-with-classes" style of coding. You see it a lot in embedded systems too. Ok in this case it's more like "C with the STL", but it's close enough. Those would exactly be the two things I'd want to add if I were a C programmer longing for a little more power.

All your critique would also apply if this were written in idiomatic C. C pointers are exception unsafe by definition because there are no exceptions. STL containers don't throw exceptions other than out-of-range exceptions, which isn't much better or worse than the access violation you'd get for the same bug in plain C.

One good reason why the code might be like this is the author doesn't know all 2568287 C++ features that are required to write modern idiomatic C++ - but the author does know C and std::map.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: