From: Tor L. <tm...@ik...> - 2010-11-23 12:16:04
|
> Well, Tor, do you think (not saying you have suggested this) that one should be scared to death to use such standard funcions Of course not. Especially if one uses them in cross-platform code that has been run under valgrind on Linux so that one can be fairly sure that they are used correctly. But obviously, Microsoft does have a point, in that careless use of strcpy() can lead to hard-to-debug heap corruption errors. But blatantly declaring standard C functions as "deprecated" is going a bit too far. (Anyway, if one is writing Windows-only code, well, why use C at all in the first place, and not an inherently safer language like C#? Which also can be quite portable to Linux and MacOSX, but I won't go into that now.) > Constantly analyzing whether something was or wasn't deprecated, or is or isn't included in a particular standard could take a lifetime. Sure, but if you use Microsoft's compiler (and headers), it will warn you when you use such "deprecated" functions. (Unless you instruct it not to, by definiting some preprocessor macros.) > Don't you think there is something like a programmer's common sense or intuition to judge wether something would work or not? Sure. But on the other hand, common sense is hard to define. --tml |