Hacker News new | ask | show | jobs
by asveikau 63 days ago
About 20 years ago I read a paper, I think it was a C++ retrospective by Stroustrup talking about the justification for C++ templates.

He actually cited this use case, of a structure that has list or tree nodes inline with the data type, as a strength of the model.

1 comments

I think that's fair. It's neat that it's possible through C++'s template system. It wouldn't be possible in many other languages.