3 ms·
But to do that you can only use a subset of C++ (e.g. you can't use arrays nor pointer arithmetic). This works for all of Zig, except for some very specific, cl
by pron 6y ago
But to do that you can only use a subset of C++ (e.g. you can't use arrays nor pointer arithmetic). This works for all of Zig, except for some very specific, clearly marked, "unsafe" operations.
- TinkersW 6y agoIt works with arrays if you stick with std::array & std::span like constructs. It also works with iterators-generally by sticking some extra data in the iterator in dev builds, so it can check for out of bounds access. If I do have some code that uses C pointers + size, I'll insert some dev build assertions.
- pron 6y agoSure, and then when you enforce that you address the third most bothersome thing for me in C++, leaving you only with the top two (for me): a complex language and slow compilation.