https://www.microsoft.com/en-us/research/project/checked-c/
Microsoft's SAL introduced with their major security rewrite in XP, provides the annotations you mention.
https://docs.microsoft.com/en-us/previous-versions/visualstu...
https://msdn.microsoft.com/en-us/library/windows/desktop/cc3...
But it all boils down to C developers actually caring about using them.
I agree that SAL fits my description. Is it available outside of Windows? I've seen that someone wanted to add SAL support to clang [0], but decided against, because of Microsoft's patent on the thing [1]. Or than that it looks cool. Thanks for the pointer.
[0] http://clang-developers.42468.n3.nabble.com/RFC-Starting-sup...
[1] https://patents.google.com/patent/US20050076331A1/en?q=Sourc...
OK, we changed to that from https://eigenstate.org/myrddin/. Thanks!
I can't wait when it will be more mature. It uses QBE compiler backend [0] - "a pure C embeddable backend that provides 70% of the performance of advanced compilers in 10% of the code". Which by itself is very interesting. It does however only support x86_64, but it seems that work on arm64 is underway.
I like that it does not depend on GCC or LLVM. I also cheer Toybox, Oil shell and other rewrite-the-world projects - I'm that kind of weird.
It ticks many boxes for me. Rust brings memory safety, but I can't help the feeling that it just looks like C++. I wonder if it would be beneficial to implement a static analyzer for C, that would take into account additional ownership information on pointers. Something like:
So it would just compile to C, but the analyzer would know more.Lately I'm wondering how good could be a dynamic language with a homegrown compiler backend. It probably does not have to be fully optimized to be faster than Python. Maybe it would not be as fast as Lua-JIT, but JIT brings it's own set of problems. It could be a fun project to make a compiler for Wren language for example. Such a language could target JVM and CLR as well.
Sorry for a brain dump, but I don't have time to make it more coherent. I may be too passionate about the topic, while lacking experience. I hope it is useful to somebody.
[0] https://c9x.me/compile/