Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.linkpendium.com!news.linkpendium.com!panix!not-for-mail From: Grant Edwards Newsgroups: comp.lang.python Subject: Re: Python Front-end to GCC Date: Tue, 22 Oct 2013 15:39:42 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 41 Message-ID: References: <4012031f-5334-4be8-a673-e0d8c8917fb2@googlegroups.com> <5264dbbe$0$30000$c3e8da3$5496439d@news.astraweb.com> <5265bba8$0$29981$c3e8da3$5496439d@news.astraweb.com> <526668e5$0$29981$c3e8da3$5496439d@news.astraweb.com> <52669852$0$29981$c3e8da3$5496439d@news.astraweb.com> NNTP-Posting-Host: dsl.comtrol.com X-Trace: reader1.panix.com 1382456382 11918 64.122.56.22 (22 Oct 2013 15:39:42 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Tue, 22 Oct 2013 15:39:42 +0000 (UTC) User-Agent: slrn/1.0.1 (Linux) Xref: csiph.com comp.lang.python:57266 On 2013-10-22, Steven D'Aprano wrote: > On Tue, 22 Oct 2013 14:04:57 +0000, Dave Angel wrote: > > [...] >> I agree with most of what you say in the message, > > Glad to hear I wasn't completely full of it. As a non-C developer, I'm > very conscious that a lot of what I know about C is second hand. > > >> but here you go on to >> say the C code is unsafely skipping initialization, which is not the >> case. > > Are you talking generically, or specifically about the C code > referenced in the link I gave? In C, static/global variables are always zeroed. > "Memory is always zeroed" is one of the advantages of Go over C and C++, > at least according to Rob Pike: > > http://commandcenter.blogspot.com.au/2012/06/less-is-exponentially-more.html Perhaps he's talking about automatic variables or malloc()ed memory? You'd have to ask him. >> Perhaps you were thinking of an automatic variable, which is not >> initialized unless the programmer says so, and is then initialized with >> code. > > No, I was thinking of an array. Arrays aren't automatically initialised > in C. If they are static or global, then _yes_they_are_. They are zeroed. -- Grant Edwards grant.b.edwards Yow! I selected E5 ... but at I didn't hear "Sam the Sham gmail.com and the Pharoahs"!