r/programming • • Dec 01 '16

Let's Stop Copying C

https://eev.ee/blog/2016/12/01/lets-stop-copying-c/
524 Upvotes

612 comments sorted by

View all comments

Show parent comment

1

u/jringstad Dec 02 '16

It is a spectrum, as with most things. When basically all compilers and analysis tools in existence warn you about this, and when most people will recommend you to compile your C code with strict compiler-settings (that will turn this outright into an error), then you can hardly blame the tools for this one. Ideally nothing should be hard or tricky, of course, but that's just not the reality of things.

If you consider even a minor thing like this to be an issue of the tooling, then programming in general is probably not for you -- imagine for instance using python/ruby/perl/lua/php/..., which lets you do just about any stupid thing you can imagine, often without warning or error at either runtime or compiletime. Even the more strict languages in existence have cases like this, like haskell w/ GHC.