
That is understandable and should have been a one time thing. what is irksome, so irksome that many of us are considering never updating is the whole mess is repeated with each minor python 3 version.Hu wrote:The Python2 -> Python3 transition was planned to have incompatibilities - and the specifics of those incompatibilities ultimately caused a huge mess, because it was so hard for people to convert over and have confidence they had done it right. This is part of why Python2.7 remained in service for so long. Converting large libraries to Python3 required a review in great detail by people intimately familiar with the library and the language, and many projects could not or would not afford the resources for that.

And since GCC 10 has been mentioned, most programs that compile with -fcommon, but don't with -fno-common, fall in that category. To the best of my knowledge, it has always been stated that the language constructs that they contain (multiple external definitions of identifiers with external linkage) result in undefined behaviour. The number of such packages is frankly appalling.Hu wrote:Programmers are then surprised when their "working" code suddenly stops working, because it was never right, but older compilers happened to produce the result the programmer wanted.


I agree with "Having a compilation time error is better than "Runtime error". However, "Statically typed" doesn't mean "Type safe".xahodo wrote:
- C is statically typed, so if the wrong type of value is assigned to a variable, that means a compile time error; as opposed to a runtime error, which could mean all kinds of harms;
Code: Select all
int main(int argc, char **argv)
{
char my_str[] = "123456";
int *wrong_type_ptr = my_str;
}
Code: Select all
int main(int argc, char **argv)
{
char my_str[] = "123456";
int *wrong_type_ptr = (int *)my_str;
}
I can think of applications where you might want to do that. A pointer cast tells the compiler "I know what I'm doing." because the pointers are all exactly the same at the machine level, at least on i?86 machines and also on PowerPC. In fact, on the PowerPC, IIRC, unsigned integers and addresses look exactly the same.YetiBarBar wrote:Furthermore, no langage will prevent coders to produce code with logic bug.
If I had pointer casting to the previous cast, no warning is longer raised but pointer computation could lead to funny bugs.Code: Select all
int main(int argc, char **argv) { char my_str[] = "123456"; int *wrong_type_ptr = (int *)my_str; }

If (huge "if") this got done, latest version (ISO/IEC IS 9899:2018 a.k.a. "C17") would be fine, since it is the default mode for all current stable versions of GCC in all currently supported architectures that have stable profiles (and a stable version of GCC).kske wrote:Out of curiosity, what standard of C would be suitable for this task?
* hadAnt P. wrote:Like I said, oh, how many years ago? We have that. It's called Paludis.
Yes, please!pjp wrote:(A) LISP it is then. Glad that's finally been settled.