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

The C++ templates example is kind of a meme, and Bjarne has pushed back on the idea that it was "accidental."

Sure, they didn't set out saying "we want to design a Turing-complete generics system" (because what kind of problem statement is that?), but templates were explicitly designed to be as general-purpose as possible. Turing-completeness was the result of that design goal:

"...I had aimed for generalty (and gotten Turing completeness modulo translation limits). I opposed restrictions to C++ immediately when Erwin Unruh presented what is widely believed to be the first template metaprogram to the ISO Standards committee's evolution working group."

http://www.stroustrup.com/bs_faq.html#understand



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

Search: