From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,HEADER_SPAM autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc772,b30bd69fa8f63cb2 X-Google-Attributes: gidfc772,public X-Google-Thread: 103376,b30bd69fa8f63cb2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-12 03:25:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!uwm.edu!rpi!not-for-mail From: "Andrei Alexandrescu" Newsgroups: comp.lang.ada,comp.lang.c++.moderated Subject: Re: C bug of the day Date: 12 Jun 2003 06:27:20 -0400 Organization: unknown Sender: cppmods@netlab.cs.rpi.edu Message-ID: References: <1054751321.434656@master.nyc.kbcfp.com> NNTP-Posting-Host: netlab.cs.rpi.edu X-Original-Date: Thu, 12 Jun 2003 02:30:22 -0700 X-Submission-Address: c++-submit@netlab.cs.rpi.edu X-Auth: PGPMoose V1.1 PGP comp.lang.c++.moderated iQBVAwUAPuhVhEHMCo9UcraBAQHHLwH+KFjv5Z4Ag25ikVg1GN5YStcxjT0blz7q MU3ZvSy/20jPLghJPNd7tdak6Or0bCaLw6RCKlg5h0qIr4vWIIvMCA== =WdG9 Xref: archiver1.google.com comp.lang.ada:39042 comp.lang.c++.moderated:68213 Date: 2003-06-12T06:27:20-04:00 List-Id: "James Rogers" wrote in message news:Xns9397C17B49692jimmaureenrogers@204.127.36.1... > "Andrei Alexandrescu" wrote in > > That's deep. I bet a ton of problems would have not existed through the > > years if C (or at least C++) would have required: > > > > int i = uninitialized; > > > > instead of: > > > > int i; > > > > to define an uninitialized variable, and would have defaulted to > > zero-initialization in the latter case. > > Interesting. Do you think the fundamental safety problem in C code > is ininitialized integers? What about memory leaks, de-referencing > null pointers, and array bounds violations? I was mentioning that just to mention a simple language design decision that's a no-brainer to implement, yet which imho has a great impact because of the psychological issue you mentioned. The others are also important, but not as trivial to implement and support without making performance tradeoffs. Andrei [ Send an empty e-mail to c++-help@netlab.cs.rpi.edu for info ] [ about comp.lang.c++.moderated. First time posters: do this! ]