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

* malloc would accept a typename argument T and return T*

* calloc would a;so accept a typename T and count and return T[count]*

* Generic containers could be implemented as something closer to C++ templates (or preprocessor macros on steroids, like T4, as you suggest).



There is no typename in C.




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

Search: