there are no good reasons we don't do this in the standards themselves, C, C++, and POSIX should all be working on editions that add safer APIs and mark unsafe APIs as deprecated, to start a long term migration. we know how to do this, we've had a lot of success with this. there are real engineering concerns, sure, but they're not reasons to not do it. compilers and library chains can retain support for less safe var…
Lib0xc: A set of C standard library-adjacent APIs for safer systems programming
41–50 of 103 posts
Re: Lib0xc: A set of C standard library-adjacent APIs for safer systems programming
#42This is great. Other things needed for a great C development environment are a standardized build process plus build tools and a standardized packaging system.
Re: Lib0xc: A set of C standard library-adjacent APIs for safer systems programming
#43This is great. Other things needed for a great C development environment are a standardized build process plus build tools and a standardized packaging system.
I think most people who are into c that I’ve met quite like header only libraries. Copy paste as a package manager does have its benefits.
Re: Lib0xc: A set of C standard library-adjacent APIs for safer systems programming
#44Re: Lib0xc: A set of C standard library-adjacent APIs for safer systems programming
#45This is great. Other things needed for a great C development environment are a standardized build process plus build tools and a standardized packaging system.
Re: Lib0xc: A set of C standard library-adjacent APIs for safer systems programming
#46Earlier quoted context omitted.
The C charter has a rule of "no invention". Anything needs to be demonstrated and used in practice before being included in the standard. The standard is only meant to codify existing practices, not introduce new ideas. It's up to compiler developers to ship first, standardize later.
That produces a bit of a chicken and egg probablem for a stdlib overhaul. Compilers and libc implementations don't have a strong reason to implement safer APIs, because if it is non-standard then projects that want to be portable won't use it , but it won't get standardized unless they do add safer APIs. So the best hope is probably for a third party library that has safet APIs to get popular enough that it becomes a…
I don't have any clue how to patch clang's front end. I'm not a language or compiler person. I just want to make stuff better. There needs to be a playground for people like me, and hopefully lib0xc can be that playground.
Re: Lib0xc: A set of C standard library-adjacent APIs for safer systems programming
#47I thought Microsoft adopted Rust. Are they back pedaling?
Re: Lib0xc: A set of C standard library-adjacent APIs for safer systems programming
#48Re: Lib0xc: A set of C standard library-adjacent APIs for safer systems programming
#49Is there anything in here for something like a "slice" or dynamically sized array that carries its length along with it?
Re: Lib0xc: A set of C standard library-adjacent APIs for safer systems programming
#50there are no good reasons we don't do this in the standards themselves, C, C++, and POSIX should all be working on editions that add safer APIs and mark unsafe APIs as deprecated, to start a long term migration. we know how to do this, we've had a lot of success with this. there are real engineering concerns, sure, but they're not reasons to not do it. compilers and library chains can retain support for less safe var…
Well, there is Annex K which is based on a previous Microsoft effort. Almost universally it is considered terrible and few people implemented it.
Not all of the APIs were brain-dead. They just ignored all previous developments and in the proposal they didn't even remove the C++-related language.