18 ms·
C will never stop you from making mistakes
- fizixer 6y ago> Short answer: because we said so. what is this bs?
- wutbrodo 6y agoA throwaway joke
- brazzy 6y agoOh boy. The conclusion sounds pretty scathing.
- hvdijk 6y agostruct Meow* p_cat = (struct Meow*)malloc(sizeof(struct Meow)); struct Bark* p_dog = p_cat; > Most compilers warn, but this is standards-conforming ISO C code that is required to not be rejected Bollocks. That is a constraint violation, ISO C requires a diagnostic for it, and ISO C allows that diagnostic to be an error. The constraint is in the section "Simple assignment", which contains "One of the following shall hold:" followed by a list detailing when assignments are valid. Pointers to different structure types on the LHS vs the RHS are nowhere in that list.
- DiabloD3 6y agoI'd also like to chime in that both clang and gcc will complain that I didn't explicitly cast it.
- quietbritishjim 6y agoThe question here is whether it is a warning or an error. "Complain" could mean either. Which did you mean?
- DiabloD3 6y agoAssuming that you have called gcc as `gcc -Wall`, it will warn, but not error. What the author of the article wants, I believe, is the equivalent of some combination of `-Wall -Werror` and `-pedantic -pedantic-errors` by default, and that's certainly unreasonable. gcc, however, isn't C, just a popular compiler for it, and clang might error on this particular one, but my memory is fuzzy. Someone else might want to chime in here.
- fanf2 6y agoYou don’t need any warning flags for these diagnostics because they are constraint violations, so a bare `cc` invocation will complain about them.
- hvdijk 6y agoA bare cc (or gcc or clang) invocation is not meant to be standard-conforming and will both reject standard-conforming code and leave out standard-mandated diagnostics. To accept all standard-conforming code, you need the -std=c[...] option e.g. to prevent it from picking up non-standard keywords. Without -std=c[...], GCC would flag a syntax error for the perfectly valid void asm(void) {}, because it detects asm as a keyword contrary to what the standard requires. Without -pedantic, no diagnostic will be issued for e.g. void f(int i) { int x[i]; } with cc -std=c90, even though C90 requires a diagnostic for an array where the length is not a constant. For GCC, this is documented at <https://gcc.gnu.org/onlinedocs/gcc-10.2.0/gcc/Standards.html#C-Language> https://gcc.gnu.org/onlinedocs/gcc-10.2.0/gcc/Standards.html....
- DougBTX 6y ago> Bollocks. Only because it is misquoted, the sentence ends: > this is standards-conforming ISO C code that is required to not be rejected unless you crank up the -Werror -Wall -Wpedantic etc. etc. etc.
- kachnuv_ocasek 6y agoIt's not misquoted. The author claims that the code "is required to not be rejected", which OP demonstrated to be false.
- deleted 6y ago[deleted]
- DougBTX 6y agoSeems you're right, all I can see is that a diagnostic should be produced, not that the code should be accepted. The impression I get is that when they say diagnostic, they really mean: "this is an error, but carry on if you like." That informs the perspective that adding warnings is a breaking change, as there is no formal distinction between error and warning diagnostics. Perhaps there's an informal "standard" between compilers for which should be which somewhere else?
- hvdijk 6y agoFor GCC and clang, while -Werror turns all diagnostics into errors, even those for valid code, -pedantic-errors will only turn the standard-mandated diagnostics into errors. This is the only reliable way I know of to determine whether the compiler considers the code to violate ISO C's rules. (I say "the compiler considers" because there are corner cases where GCC and clang disagree in their interpretation of the standard.) If your warning does not get upgraded to an error with -pedantic-errors, the warning is about something the compiler authors consider relevant to warn about but the standard allows.
- gwd 6y agoWhat's even stupider is that I'd be willing to bet it's also UB. If it is, it means an ISO-C-compliant compiler is allowed to generate code that does absolutely anything; which makes the worries over adding a warning kind of ridiculous.
- wtallis 6y agoI wonder if this might be a case where the assignment isn't undefined behavior, but an attempt to dereference the pointer and access the wrong struct type's members would be.
- fanf2 6y agoThe Bark Meow pointer conversion isn’t UB itself, provided you convert the pointer back to the correct type before dereferencing it.
- kstenerud 6y agoA diagnostic is not a rejection. The full quote explains his thought: "Yes, two entirely unrelated pointer types can be set to one another in standards conforming C. Most compilers warn, but this is standards-conforming ISO C code that is required to not be rejected unless you crank up the -Werror -Wall -Wpedantic etc. etc. etc." Unless you make warnings errors (-Werror), it probably will warn, but will not reject the code (fail to compile).
- hvdijk 6y agoIt specifically makes the false claim that ISO C requires it to not be rejected, right there in what you quoted. ISO C requires no such thing. ISO C requires compilers to diagnose it and allows them to choose whether to accept or to reject it. If compilers want to make it a hard error, they're perfectly free to do so. The fact that they don't is their choice, not something ISO C imposes on them.
- deleted 6y ago[deleted]
- raxxorrax 6y agoThis is dangerous of course because dogs are larger than cats, but I think he is correct. While every compiler I tried has this warning enabled for assignments or comparisons by default, I don't think the standard explicitly forbids it. Could be wrong though.
- hvdijk 6y ago> I don't think the standard explicitly forbids it. I already wrote exactly where the standard explicitly forbids it in the message you replied to.
- raxxorrax 6y agoI looked it up... > both operands are pointers to qualified or unqualified versions of compatible types Not sure, but I still would say he was correct. The compiler might not be able to check if the types are compatible, so the warning as a standard behavior is anticipatory. Sensible, yes.
- hvdijk 6y ago"Compatible type" is defined in the standard as well. It doesn't mean "whatever the compiler thinks is compatible", it's what the section "Compatible type and composite type" defines as compatible. Different struct types are not compatible.
- BunsanSpace 6y agoThe standard does not. It's common to get a data payload of struct A, but cast it's pointer to struct B which is a subset of struct A (at is the first elements. Actually in the Win32 API this is done a lot. Often you're even given a void* to some arbitrary data that you need to figure out what should be there. Sometimes it's not even a pointer it's two integers packed together, in the case of WM_MOUSEMOVE messages.
- richardwhiuk 6y agoA* -> void* -> A* is legal A* -> void* -> B* is undefined A* -> B* is undefined If you want to get the first element, you want, &(A->first), not a cast. The cast isn't guaranteed to be defined, and isn't guaranteed to be the same.
- zvrba 6y agoI can't bother to dig out the reference, I know that but C explicitly allows such assignment when `p_dog` is the first member of `p_cat`, i.e., when struct Meow { struct Bark dog; }
- hvdijk 6y agoNope, C doesn't allow such assignment even then. You're thinking of casts. For casts, the C standard requires that a pointer to a struct can convert to a pointer to its initial member and vice versa, this is specified under "Structure and union specifiers". You need to actually spell it out with a cast though, C doesn't allow that to be done as an implicit conversion.
- NovemberWhiskey 6y agoIt's been a while since I called myself a C expert, but that's not an assignment - it's an initialization. Those are not the same things in C; I think if you go look at your C standard for the constraints on initialization, they are different from and weaker than those for assignment.
- kllrnohj 6y agoCorrect, the warning is about initialization: "warning: initialization of 'struct Bark ' from incompatible pointer type 'struct Meow '" https://godbolt.org/z/zK45Ys https://godbolt.org/z/zK45Ys
- hvdijk 6y agoYou're correct that initialization is not assignment, but the assignment section is still the relevant place to look: the initialization section says "the same type constraints and conversions as for simple assignment apply". But that isn't obvious and I should have spelled that out.
- NovemberWhiskey 6y agoBut that's in the semantics section; not the constraints section; right?
- hvdijk 6y agoHeh, true. It's pretty clearly meant to mean that the constraints for simple assignment apply as constraints for initialization too, but if you were to argue that the constraints of simple assignment are imported as semantics for initialization, and therefore violations render the behaviour undefined (not requiring any diagnostic), I wouldn't be able to point to anything that shows that to be wrong other than common sense, and common sense can be wrong. The same applies to the return statement, which says "is converted as if by assignment" outside of its "Constraints" section as well.
- Upvoter33 6y agoone should never get in the way of a good rant. more seriously, what I'd like to see in C (as a long-time programmer in C) is less freedom around undefined behavior. I used to feel like the biggest mistakes made in C were around pointer bugs, but you can be careful and get things like that (mostly) right. Undefined code is a lot harder to see and avoid without a very deep understanding of lots of small details.
- wtetzner 6y agoIt would be very nice if there was a special C compiler that could just warn about all occurrences of undefined behavior in a program. It doesn't even need to be able to generate code, it could just be a front-end that points out the places where undefined behavior is either being invoked, or could be invoked depending on the input to the program.
- MauranKilom 6y agoDoes this piece of code have UB? Could it invoke UB depending on the input to the program? void count(int x) { for (int i = 0; i < x; ++i) printf("%d ", i); } The answer to the latter question is of course "yes" - signed integer overflow is UB, so you invoke UB by passing a negative x. Would you like every loop to be flagged as potential UB? I don't think you'd last a single day programming in that C dialect.
- wtetzner 6y agoYou wouldn't use the compiler to build you programs, you'd just use it to detect UB. It would be especially useful if you could specify your entry point(s), and let it find all cases where user inputs could cause UB. I think it would be especially helpful for checking the output of compile-to-c languages.
- wool_gather 6y agoI assume you've seen John Regehr's "Proposal for a Friendly Dialect of C"? https://blog.regehr.org/archives/1180 https://blog.regehr.org/archives/1180 The basic idea is to replace various common UB scenarios with "defined, but unspecified", in order to move the compiler's interpretation of the program closer to the programmer's.
- torh 6y agoWell, I liked the part about (* vague gesturing towards outside *)
- dooglius 6y agoThis is a dumb argument. The proposal was to add a new kind undefined behavior that breaks a bunch of existing code, and this is spun as not helping?!
- kevincox 6y agoThat's not what the article claims. It claims that it was only adding a warning.
- MauranKilom 6y agoThe code already has UB if it does not respect the "const in spirit"-ness of what those functions return. The warnings would be introduced to prevent new code from triggering that foot gun.
- deleted 6y ago[deleted]
- eerimoq 6y agoOf course the language can help the programmer to write better code. High level constructs and easily available libraries that are well tested and widely used helps a lot. However, the biggest problem is not the language, it's that the programmer simply writes faulty code.
- speedgoose 6y agoSo you have two main solutions for this problem : have all programmers to never ever write faulty code, or design and use programming languages that are safer and less error prone. One is impossible, while the other is already applied.
- eerimoq 6y agoIn my experience most bugs are due to misunderstanding requirements and simply writing faulty logic. Just a few bugs are related to the language itself.
- bionhoward 6y agosounds like a stealth argument for rust?
- bigdict 6y agoint main (int argc, char* argv[]) { (void)argc; (void)argv; struct Meow* p_cat = (struct Meow*)malloc(sizeof(struct Meow)); struct Bark* p_dog = p_cat; // :3 return 0; } Why declare main that way if you are going to discard the arguments? Why cast the malloc? This isn't C++.
- scruple 6y agoI'd like to know, too. Have never seen either in practice.
- flohofwoe 6y agoThe "pointless" cast is required for libraries that are written in the common subset of C and C++ so that they can be compiled both in a C or C++ compiler. Some people prefer to compile C code through a C++ compiler for various reasons, Microsoft has even been recommending this because their C++ compiler isn't quite as terribly outdated as their C compiler: https://herbsutter.com/2012/05/03/reader-qa-what-about-vc-and-c99/ https://herbsutter.com/2012/05/03/reader-qa-what-about-vc-an... (not that I agree with the reasons, but for a library it makes sense to not lock out people who prefer to compile C libraries as C++ when integrated into a C++ project).
- scruple 6y agoThank you! That's interesting and it makes sense.
- rootbear 6y agoThis is what you get when a person who is mostly a C++ coder (as per his bio) writes C. I cringe when I see things like struct Bark* p_dog = p_cat; instead of struct Bark *p_dog = p_cat; That weird affectation of C++ programmers putting the asterisk on the type and not on the declarator, where it belongs, makes my eyes bleed. I somewhat understand the reasoning, but I think it's a gross violation of the Law of Least Astonishment.
- loriverkutya 6y ago"We will not make it easier for new programmers to write better C code." - well, that escalated quickly
- noelwelsh 6y agoAnd this is how backwards compatibility comes to kill innovation. It's a reasonable stance to keep supporting your long established users but it comes at the cost of ceding the future to the competition (cough Rust cough)
- schemy 6y agoRust is the future and always will be.
- deleted 6y ago[deleted]
- mytailorisrich 6y agoIMHO that's how it should be for a programming language. If a programming language evolves to the point that previous programs written in that language no longer compile then it's no longer the same language. So let's keep C as C and, as you point out, new ideas and concepts that would break things can be implemented in new languages. C does evolve but it's also taken the pragmatic approach not to break the huge existing code base it has. In many cases these programs have been running for decades, they work.
- Tehnix 6y ago>If a programming language evolves to the point that previous programs written in that language no longer compile then it's no longer the same language. I don't really buy that you cannot ever introduce breaking changes. That's a recipe for disaster and IMHO short-sighted. >In many cases these programs have been running for decades, they work. And in many other cases, they have been full of security holes that take an incredible amount of work to discover. Something like Rust's editions seems to solve this problem very well, and is indeed what they are intended for. You can still compile old code, you just won't have full access to new features if you choose to do so. This provides a way to keep legacy systems alive while providing an upgrade path for them at the same time.
- me_me_me 6y agoA short summary. "I tried punching myself and C let me do it. Now I am ranting how C gave me a nose bleed." If you are using C for projects that are big and abstract then you are THE problem for picking wrong tools for your task. I killed a mosquito with a hammer but it left a hole in my wall => hammers are terrible tools.
- 59nadir 6y agoThis isn't even remotely what the post is about. It's about how the C standard is resistant even to things like warnings for provably bad code in the name of backwards compatibility ("more warnings for (maybe) working code = bad"). Did you even read the post?
- kevincox 6y agoTrying to avoid adding warnings is a very silly form to twisted logic. 1. People enabled warnings and -Werror because they want high quality code. 2. Standard can't add warnings because people use -Werror This means that not adding warnings is directly against the original reason to use -Werror in the first place! We are now avoiding warning people about dangerous things because they requested to be warned about dangerous things!
- flohofwoe 6y agoThe argument also doesn't make much sense because all 3 big compilers are already adding tons of warnings with each new release. Upgrading to a new compiler version and seeing screens full of warnings scroll by when compiling code that was warning-free in the previous compiler version is quite normal. Why does this affect the C committee's decision making, and why is it suddenly a problem?
- sramsay 6y agoIf I'm following the author's argument correctly, the very influential companies who maintain very large, very old C code bases don't like what you just described -- new warning messages in code that used to not have any. They worry, then, that if the STANDARD actually mandates a warning, that is even more likely to happen, and that makes the very influential companies very sad. Which sounds like bullshit to me.
- adrianN 6y agoIt actually makes a little sense: Many companies are required to ship code without warnings (for example in safety-critical systems). Fixing warnings is very expensive and can introduce new bugs in code that has been running fine for decades. If you force new warnings into the compiler the result would be that these companies simply stop using newer versions of the compiler.
- flohofwoe 6y agoPart of the normal "warning hygiene" process is deciding when a new warning in old code should be fixed and when it's better to suppress it. One my favourite warnings in this regard is gcc's misleading-indentation warning. The warning makes sense for new code written by a human, but if the code is machine generated, or decades old without showing any signs of problems caused by a "misleading indentation", then it is indeed much less risky to simply suppress that particular warning in that particular source file or library.
- userbinator 6y ago...and that's a good thing. Console homebrew. iOS jailbreaking. Android rooting. Those are only some of the freedom-enabling things this and other "insecurity" allows. It's not all bad --- and IMHO it's necessary have these "small cracks", as it keeps the balance of power from going too far in the direction of the increasingly authoritarian corporations. I always keep this quote in mind: "Freedom is not worth having if it does not include the freedom to make mistakes."
- TonyTrapp 6y agoTrust me, none of the memory errors in those examples come from the omission of a `const` in a pointer. It's not like adding `const` to a pointer will write-protect that memory so that magically exploits become impossible. All those insecurities that lead to exploits are buffer overruns of some sort, and nothing would change about them with this sort of little language change.
- ameliaquining 6y agoThis has nothing to do with any of that. Absolutely nobody is proposing that it shouldn't be possible to write code that reads from and writes to arbitrary registers and memory addresses, even though this obviously makes complete memory safety impossible. (I mean, there are legitimate use cases for sandboxing and VMs and what have you without escape hatches, but there are also legitimate use cases for not-that.) This is about providing better compiler diagnostics. Such diagnostics can't catch every mistake, as long as we require the aforementioned ability to perform arbitrary operations, but they can catch a lot more mistakes than they're catching now.
- ho_schi 6y agoBackwards compatibility for code is important, like progress in language evolution. I have question regarding "C has no ABI that could be affected by this, C doesn’t even respect qualifiers, how are we breaking things?!" We have language standards for changes like this like '-std=c2x' or '-std=c89' with GNU's GCC. I understand and accept the matter of avoiding breakage. Furthermore C is inherently weakly typed, contrary to C++ which is strongly typed. Something you probably should not change, because that are basic language features. But the option to set the language standard does exist for this situation, to allow changes which will affect users. So why it cannot be used here? That is not a critic. I'm sure that have their rationale for that and know more than me. PS: Some changes will break the ABI, in that cases we likely see a PREPROCESSOR variable or something like that which is more complicated. The GCC people used it for some changes to std::string if I remember correctly.
- godshatter 6y agoI was wondering this myself. Those million line codebases where they are worried about new warnings breaking things should be using a compiler already that doesn't know about the new standard, or one that allows you to set which standard their code is following. I guess I don't understand the problem. Does something like MISRA assume you are using the latest standard? I understand there are regulations involved.
- saagarjha 6y agoIt's also wrong, newer standards do change the signatures of functions–a lot of them got noreturn added in C11.
- mlthoughts2018 6y agoNeither will Haskell, Rust, etc. The extra classes of mistakes they can prevent at compile time just aren’t a meaningful volume of mistakes to make a practical difference in the lives of any developers apart from a few niche system engineering use cases. If you think languages should facilitate type system design patterns that render large classes of application level mistakes impossible, you are just an architectural astronaut falling prey to premature abstraction and unaware that these languages aren’t making your application code safer or more reliable, only more brittle to the inevitable needs to break its core abstractions to solve expanding use cases.
- ameliaquining 6y agoThis is a very strong claim. Do you have evidence for it? (Yes, I'm aware that there've been a bunch of studies that didn't find decreased "bug density" in open source repos using statically typed languages, but there've also been studies that found the opposite, and in any event the methodology behind all of these is dubious. Example saga: https://hillelwayne.com/post/this-is-how-science-happens/ https://hillelwayne.com/post/this-is-how-science-happens/)
- mlthoughts2018 6y agoI disagree it’s a strong claim. I think the claim that strict functional programming or type system enforcement of safety has no data supporting it significantly improves anything (defect rate, speed of development, security, etc.). The strong claims come from evangelists of those extreme programming paradigms. You should be asking them for proof that consists of more than anecdata. It’s backwards to say that essentially what is a historically validated null hypothesis with 50 years of development history on its side is “a strong claim” that requires special evidence, while giving a free pass to all the people using little more than blog posts and slick syntax to claim these extreme design patterns are demonstrably better. If they are so much better, where are all the companies getting free lunches just by switching to these tools? How is it that the entire industry is so irrational that so few companies are willing to switch? Superior ways of working catch on very fast, just consider the radical adoption of GitHub and no-sql data systems. Why is strict functional programming not seeing that? What mental gymnastics does it require to take as a premise that strict functional programming is “better” yet adoption rates are super low and successes are not proved with data, only anecdotes?
- ddevault 6y agoBe advised that every new C project written by experienced developers begins with `-Wall -Wextra -Wpedantic -Werror`
- account42 6y ago-Werror is a bad idea for open source projects or anything that will be compiled by people who do not know how to fix things when their shiny new compiler added a fancy warning. -Werror=... for specific warnings might be OK in some cases.
- ddevault 6y agoThey can just remove -Werror when compiling. It's useful enough to keep in place by default if you consider warnings bugs (and you ought to).
- saagarjha 6y agoSo would you agree that it might be a useful thing to use for local development, but not for code you want other people to compile?
- nly 6y agoThat still doesn't turn on many warnings. Clang has -Weverything for this.
- gnulinux 6y ago-Weverything contains contradictory errors. I think -Wmost is better but it's probably still very noisy.
- staticassertion 6y agoWhat does it mean to be the 'Project Editor' of C?
- steveklabnik 6y agoMy understanding of the role is that it's their job to literally edit the standard, that is, they take the papers that have been accepted, and apply them to the standard's text to produce the next draft of the standard.
- panpanna 6y agoActually, "C will never stop you from doing <things>".
- csours 6y agoC is a knife. You expect knives to cut you, so you handle them carefully. Except that C is sometimes a knife with another knife hidden in the grip and it you don't handle it just right, the hidden knife will also cut you. (Thinking of libraries/other people's code)
- craftinator 6y agoLol I love this analogy. It's pretty much like Darth Maul's lightsaber. Yeah, it'll cut through anything; even stuff you aren't looking at
- virtue3 6y agoJust like with C code, you better be force(memory) sensitive to even think of wielding the space wizard laser sword.
- csours 6y agoAh, pointers, not as clumsy as objects; an elegant weapon for a more civilized age. (I know objects are actually just fancy pointers)
- saagarjha 6y agoNote that there are materials that resist lightsaber blades: https://starwars.fandom.com/wiki/Lightsaber/Legends#Lightsaber-resistant_materials https://starwars.fandom.com/wiki/Lightsaber/Legends#Lightsab...
- deleted 6y ago[deleted]
- choeger 6y agoSounds like a bad case of the tail wagging the dog to me.
- quelsolaar 6y agoIf the C standard org was serious about code safety the FIRST thing they would do is PUBLISH THE STANDARD!!!! Complaining that people don't follow the finer details of the standard while at the same time keeping the standard unavailable to the vast majority of C programmers is a travesty. When compiler writers think that its ok, to put "optimizations" in to compilers that remove vital NULL checks, because the the spec says that something may be UB that make no sense, I think to myself, What would they say If they downloaded the latest version of their favorite text editor, only to find that it would format their system disk when ever the user presses Control? When they then reached out to the maker of the text editor, the developers would answer: "Oh, on page 204 in the documentation that costs money to access it says that pressing Control, is undefined, we we are in our rights to format your system disk". Would they be ok with that and think it was fair? Thats how the C standard body is behaving! NOBODY learns C form the C standard, and that is your fault, so don't complain about people not following it. The fact that you are also fucking it up doesn't help: (https://news.quelsolaar.com/2020/03/16/how-one-word-broke-c/ https://news.quelsolaar.com/2020/03/16/how-one-word-broke-c/)
- lqet 6y agoA comment on your blog post. You are writing: > In C89, undefined behavior is interpreted as, “The C standard doesn’t have requirements for the behavior, so you must define what the behavior is in your implementation, and there are a few permissible options”. But isn't the sentence > Permissible undefined behavior ranges from ignoring the situation completely with unpredictable results in the C89 spec already giving the compiler developers carte blanche to do whatever they want? Anything can be interpreted as "ignoring the situation with unpredictable results". In your criticism of C99 (where the word "permissible" was changed to "possible") you write: > In C99 undefined behavior is interpreted as, “The C standard doesn’t have requirements for the behavior, so you can do what ever you want”. [..]. If for instance you have a large codebase like say the Linux Kernel and there is a single instance of undefined behavior somewhere in there the compiler is free to produce a binary that does what ever it wants. It doesn’t have to document what it does, it doesn’t have tell the user, it doesn’t need to do anything. This exactly fits the C89 spec. The compiler may just ignore that you are relying on undefined behavior and produce a completely unpredictable binary.
- kps 6y agoThe real problem with n2526 is that it proposes fixing the return types of locale functions, rather than deprecating that hot mess entirely.
- jedisct1 6y agoTake a look at Zig. https://ziglang.org/ https://ziglang.org/ It fixes most of the C mistakes, while still giving programmers tight control over the system.
- vandal_at_your 6y agoWhen you demonstrate that your ECNL (equally crappy new language) merits an investment of time guaranteed not to break in perpetuity against programmers in the future and changing standards I'll make an effort to learn it. Mind, it must be as free (to use,modify,permute and as low level) ~ C. I must be able to do what I need to do without being second guessed bc it's dangerous. There are some people who know when to be dangerous and slowing us all down to the speed of the slowest bootcamp grad or most avaricious exploiter of minimal talent isn't progress. Otherwise I'll stick with the libraries I know, trust, and have written in C. This article is great mudsticking btw.
- app4soft 6y ago> C will never stop you from making mistakes As making mistakes is nature of human, and C will never stop human from making mistakes, then C will preserve human be natural forever!
- da39a3ee 6y agoPlease tell me if I misunderstood but this is what I thought I was reading here: - The author is someone quite young (undergrad age) who is serving on a C language committee (that I assume is mostly made up of people who are over 40, probably mostly over 50). - The author not only is donating his own time to C language committee work, but also clearly knows what he's talking about regarding C. The article came across to me as thinly-disguised frustration/anger that the committee had no interest in making C "safer". My take away was that the article very much fitted in with all the articles one sees being positive about Rust not just being of academic / hobbyist interest but being a serious contender for a replacement in many industry contexts.
- pm24601 6y agoYet more worshipping on the fear of change. Simply speaking. If the code is suspicious, it should be treated as such. I am not tied to some definition of perfection but rather the practical. Developer tools help write safer code. If that code is running dangerous equipment this is even more important. The expectations and quality needs to be raised. ESPECIALLY in operating systems, device drivers and yes code that has been running "just fine" for years.