3 ms·
> Pity that they decided to just bother with C99 though. Isn't this the trend nowadays? I've seen recently that simple languages are trending again, languages
by johnnycerberus 6y ago
> Pity that they decided to just bother with C99 though.
Isn't this the trend nowadays? I've seen recently that simple languages are trending again, languages like C, Go, Zig, Erlang, Lua. I think we hit the ceiling with mammoths like C++ and Scala.
- pjmlp 6y agoNot at all, proprietary graphics APIs provide modern bindings in C++, Objective-C, Swift.
- amaranth 6y agoC99 ensures it can be used with basically every other language and can be compiled for almost every platform. Bindings on top of that for other languages would be nice but can be provided by the community too. If it was C++, Rust, Nim, etc you'd have to write it in a way that allows exposing a C API anyway so the only advantage would be for people creating an implementation of the API getting to use a better language internally.
- pjmlp 6y agoThat can be achieved with an IDL that isn't unsafe by default and the cause of endless security bugs. Then everyone can generate whatever bindings they feel like in an automated way.
- pantalaimon 6y agoBut why C99 instead of C11?
- moonchild 6y agoWhat features does c11 provide that would be useful?
- marcthe12 6y agoAtomic 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.
- bsder 6y agoBecause Microsoft basically won't support C11.
- pjmlp 6y agoThey do via clang, long part of Visual Studio installer (since 2015), Visual C++ as C++ compiler naturally not. And they aren't the only ones, try to see how much of Apple or Google OS applications you manage to write with C11 alone.
- marcthe12 6y agoThey recently added it the roadmap though.
- pjmlp 6y agoWhere is this roadmap? There is no public plan to add to Visual C++ anything more than what ISO C++ requires in terms of C source code and libraries compatibility. Microsoft has contributed to clang on Windows for those that still want to use C.