Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is anyone attempting to do the same with C though? Carbon & cppfront, if successful, would only "save" C++. C would still be left out to dry. Then again, the C committee is also pretty much phoning it in and has been for quite a while now.


Yes. Microsoft Research is working on "Checked C": https://www.microsoft.com/en-us/research/project/checked-c/

As a test, someone ported FreeBSD's networking stack to Checked C. It was easy and there was no overhead to performance and binary size.


That's pretty interesting. It really undersells itself in the intro description where it sounds something more like clang's ubsan -fsanitize=bounds, but in actuality it's adding other features as well including generics. Although that said, it's somewhat odd that memory lifetime is entirely ignored by it. All the changes seem to be laser focused on bounds checks and bounds checks only (with generics being to eliminate `void*` specifically so that, you guessed it, bounds checking can be done)


> Is anyone attempting to do the same with C though?

Absolutely. In fact cfront preceded cppfront by many years ;-)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: