3 ms·
This is the type erasure approach, whose cons are mentioned in the article.
by xigoi 1y ago
This is the type erasure approach, whose cons are mentioned in the article.
- codr7 1y agoIt's the C approach, strong typing doesn't mix well with raw memory access.
- xigoi 1y agoNim is strongly typed and allows raw memory access just fine.
- deleted 1y ago[deleted]
- 1718627440 1y agoThe very article we are discussing shows you a way how to do that type safely in C. It uses #include which is a very idiomatic way to do this in C, and an example where a preprocessor-based approach is more flexible, than e.g. a module system.