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

I'm on the same arc (especially the template Kool-Aid phase), except perhaps further along: now I forgo C++ entirely and write plain C because it's so much easier to wrap from higher-level languages.

I do miss smart pointers, but on the other hand, dealing with malloc and friends keeps me honest about what really needs to be written in C.




For the high performance stuff I write my kind of restrained C++: never STL in the interfaces of the "modules," use STL algorithms (they are good) but otherwise manage memory in custom ways (which is easier by not using STL containers!).

But I had to solve one interesting problem using some recursive definitions and code, and discovered that once I "freed" the code from classes (made them C functions) I was able to express it properly -- just having them as members prevented me to see that the solution is much more obvious when you actually use plain pointers and don't think about the same "object" even during the life of the function. Add to that in the member "this" can't be null.

When you need real expressiveness, C can't be beaten. C++ syntactic sugar helps sometimes, but limiting to it is... limiting!




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: