They are implemented in the C libraries for OpenBSD, FreeBSD, NetBSD, Solaris, OS X, and QNX.
They have not been included in the GNU C library used by Linux.
They are implemented in the C libraries for OpenBSD, FreeBSD, NetBSD, Solaris, OS X, and QNX.
They have not been included in the GNU C library used by Linux.
When it doesn't (work), it is NOT because of a failure in the language; It is because C has (and always will have) the "basic philosophy that programmers know what they are doing;".
Criticising C, is like criticising assembly. What's the point?
If people want to criticise a programming language, then they should always start with C++, not C.
C++ was designed to allow us to develop bigger and more complex programs, and yet, C++ inherited from C?
How stupid was that! But people are happy to give out various awards and medals to the person who made one of the dumbest decisions ever made, in the whole history of computing!
Leave C alone. It's fine. It's C++ that is the problem.
Trying to make C 'foolproof' however, is an excercise in futility, and in any case, can only come about by morphing it into a fundamentally different language.
An argument in this thread, is that you shouldn't be able to pass an array without the argument being passed having some implicit 'size' element associated with it. That is NOT C.
Conflating pointers with arrays, that is C.
Again I feel the need to quote this:
"C retains the basic philosophy that programmers know what they are doing; it only requires that they state their intentions explicitly."
If you don't know what you're doing, don't use C.
C should be considered a 'specialist' language - much like doing brain surgery - if you're doing it, you better know what you're doing, else go be a GP or something.
And, if you're project doesn't absolutely require that you use C, don't use it. Instead, use something that is more 'foolproof'. (and I don't mean C++!!!)
D should focus less on being a better C, and more on being a replacement for C++. Then, I might take D more seriously.
No attempt to morph C (i.e. the language, not the library) into something else will ever succeed.
Leave C alone!
Since then I thought, not knowing any amount of C, that strl* was part of the language and available to all.
Imagine if you will my confusion everytime I read people complaining about C being insecure.
Your comment corrected my perception of this. Thank you.
I'm in DevOps field, and this 'make it right from the start' resonates strongly with me. Richard Feynman: Disregard others :)