4 ms·
Atomic and Generics. Awkward to use and relatively unknown but c11 introduced them
by marcthe12 6y ago
Atomic and Generics. Awkward to use and relatively unknown but c11 introduced them
- moonchild 6y agoHow do atomics help a high-level graphics API? The implementation can use them, but threading probably shouldn't be part of the interface. Generics are cool, but auxiliary to any core part of the api since it's not really possible to use them outside of in a macro that wraps over a real function.
- Reelin 6y agoCan't you (ie the programmer) still use them though? You can write C11 code which freely calls the C99 API. By using C99 the API is compatible with a wider range of compilers and callable from a broader range of languages. (Also where would the API itself have benefited in any significant way from the use of atomics or generics? Recall that compiler support for atomics is optional in C11.)
- marcthe12 6y agoGeneric could help but that could be just a wrapper over the main api.