Hacker News new | past | comments | ask | show | jobs | submit login

Is there a reason discussion around C is phrased like this? My reaction to that quote is, "yeah it could possibly have some issues we're not really sure of, but it seems reasonably battle-tested too". It evokes a bit of mixed signal messaging, to me at least.



The C committee (unlike the C++ committee) usually only considers proposals which have implementations to show. And the more real-world experience there is with the extension, the better.

Also consider that this extension is designed in a way that existing code can be annotated without requiring drastic changes, and that it has been designed to remain ABI compatible.

A 100% watertight solution most likely requires new language features (or even a completely new language like a "Rust--") that would violate both of those requirements.


Yes, ISO and WG14.

It is only C if it lands on the standard, otherwise it is yet another compiler specific language extension, that portable code cannot rely on.


That's not really a problem though. Pretty much any non-trivial real-world codebase isn't pure standard C, many are absolutely riddled with non-standard extensions and it works just fine (you'll need to build and test on all supported compilers and platforms anyway).

For that Clang extension above it looks like it's possible to annotate source code without breaking compilers that don't support the extension by defining a handful of dummy macros.

IMHO the actual strength of C is that compilers can (and do) explore beyond the standard on their own.


Despite urban myths plenty of languages have implementation specific extensions, it isn't some feature exclusive to C dialects.

It is definitely a problem when said extensions don't have a counterpart in other compilers, specially a pervasive feature like bounds checking.




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

Search: