--- /dev/null
+Return-Path: <dkg@fifthhorseman.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 30BA6431FAF\r
+ for <notmuch@notmuchmail.org>; Thu, 17 May 2012 14:51:32 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+ autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id kBi4xs1QyYN1 for <notmuch@notmuchmail.org>;\r
+ Thu, 17 May 2012 14:51:31 -0700 (PDT)\r
+Received: from che.mayfirst.org (che.mayfirst.org [209.234.253.108])\r
+ by olra.theworths.org (Postfix) with ESMTP id 632E3431FAE\r
+ for <notmuch@notmuchmail.org>; Thu, 17 May 2012 14:51:31 -0700 (PDT)\r
+Received: from [192.168.13.75] (lair.fifthhorseman.net [108.58.6.98])\r
+ by che.mayfirst.org (Postfix) with ESMTPSA id 79C7EF970\r
+ for <notmuch@notmuchmail.org>; Thu, 17 May 2012 17:51:29 -0400 (EDT)\r
+Message-ID: <4FB572DA.8040906@fifthhorseman.net>\r
+Date: Thu, 17 May 2012 17:51:22 -0400\r
+From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>\r
+User-Agent: Mozilla/5.0 (X11; Linux i686;\r
+ rv:10.0.3) Gecko/20120329 Icedove/10.0.3\r
+MIME-Version: 1.0\r
+To: Notmuch Mail <notmuch@notmuchmail.org>\r
+Subject: Re: [PATCH 4/6] cli: intialize crypto structure in show and reply\r
+References: <1337205359-2444-1-git-send-email-jrollins@finestructure.net>\r
+ <1337205359-2444-2-git-send-email-jrollins@finestructure.net>\r
+ <1337205359-2444-3-git-send-email-jrollins@finestructure.net>\r
+ <1337205359-2444-4-git-send-email-jrollins@finestructure.net>\r
+ <1337205359-2444-5-git-send-email-jrollins@finestructure.net>\r
+ <8762bvi70k.fsf@nikula.org>\r
+ <877gwaeve1.fsf@servo.finestructure.net>\r
+ <CAB+hUn9DdeaFj-hUNb_c1V3QLsbWjsE7_hpuOpDqWseayASdKQ@mail.gmail.com>\r
+ <87aa16daeq.fsf@servo.finestructure.net>\r
+In-Reply-To: <87aa16daeq.fsf@servo.finestructure.net>\r
+X-Enigmail-Version: 1.4.1\r
+Content-Type: multipart/signed; micalg=pgp-sha512;\r
+ protocol="application/pgp-signature";\r
+ boundary="------------enig211B718926B718A80E8BA9D1"\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+Reply-To: notmuch <notmuch@notmuchmail.org>\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Thu, 17 May 2012 21:51:32 -0000\r
+\r
+This is an OpenPGP/MIME signed message (RFC 2440 and 3156)\r
+--------------enig211B718926B718A80E8BA9D1\r
+Content-Type: text/plain; charset=UTF-8\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+On 05/17/2012 12:45 PM, Jameson Graef Rollins wrote:\r
+> I want them explicitly set for clarity, as well as safety. Code is\r
+> meant to be read by humans, not computers. =20\r
+\r
+I sympathize with this sentiment.\r
+\r
+> It's much safer to explicitly set them to what you want\r
+> them to be rather than just assume they'll be set correctly.\r
+\r
+I don't think it's an assumption -- Jani is probably relying on the C\r
+standard. Consider, for example, C99 [0]'s section 6.7.8.19, which says:\r
+\r
+ all subobjects that are not initialized explicitly shall be\r
+ initialized implicitly the same as objects that have static\r
+ storage duration.\r
+\r
+the latter clause references 6.7.8.10, which says:\r
+\r
+ If an object that has static storage duration is not\r
+ initialized explicitly, then:\r
+ =E2=80=94 if it has pointer type, it is initialized to a null pointe=\r
+r;\r
+ =E2=80=94 if it has arithmetic type, it is initialized to (positive =\r
+or\r
+ unsigned) zero;\r
+ =E2=80=94 if it is an aggregate, every member is initialized\r
+ (recursively) according to these rules;\r
+\r
+So it's not just "an assumption", it's a guarantee from the underlying\r
+language standard.\r
+\r
+That said, it's a guarantee i was unaware of until i researched this.\r
+I'm certainly not a C guru, but i've internalized a fair amount of C's\r
+rules and structure and i'd never heard of this\r
+subobject-default-initialization-when-other-subobjects-are-initialized\r
+rule before. If i'd seen the uninitialized members of the struct, and\r
+that they were being used without explicit initialization, i would have\r
+had to do a bit of digging to understand what's happening.\r
+\r
+The real tradeoff in this choice is whether we prefer:\r
+\r
+ a) more compact code to facilitate quick reading by experts\r
+\r
+ or\r
+\r
+ b) more verbose code to facilitate comprehension by the non-expert.\r
+\r
+I started this discussion leaning strongly toward the (b) perspective.\r
+But now that i know the relevant bits of the standard, i can sympathize\r
+with the (a) perspective as well :P\r
+\r
+Overall, i think i'm still in the (b) camp. But i think it's more\r
+important that we don't allow dithering over this issue to prevent the\r
+inclusion of this patch series, which is a step in the right direction\r
+for handling S/MIME messages as well as PGP/MIME.\r
+\r
+ --dkg\r
+\r
+PS gcc's -pedantic argument provides the following warning:\r
+\r
+ error: ISO C90 forbids specifying subobject to initialize\r
+\r
+So we probably want to specify -std=3Dc99 at least to ensure our choice o=\r
+f\r
+subobject initialization is respected.\r
+\r
+[0] http://www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf\r
+\r
+\r
+--------------enig211B718926B718A80E8BA9D1\r
+Content-Type: application/pgp-signature; name="signature.asc"\r
+Content-Description: OpenPGP digital signature\r
+Content-Disposition: attachment; filename="signature.asc"\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.12 (GNU/Linux)\r
+Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/\r
+\r
+iQJ8BAEBCgBmBQJPtXLaXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w\r
+ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQwRUU1QkU5NzkyODJEODBCOUY3NTQwRjFD\r
+Q0QyRUQ5NEQyMTczOUU5AAoJEMzS7ZTSFznpQO4P/246CcM6ig/nB2mkmephJFTt\r
+MJ/x5P2SCPwhCx8DfVyHco1e8WZgk/X3Q5+bHVClSpJZrsydt3qSsOfU/KG6S4kr\r
+M6DrGv8UUpeBDNH+x5K0AW/27A9InmdEpGBeCizGyIRue/R8PU4+xgc8hox3z43r\r
+oMuBa+VOmHmlv4dPCR6XvsxWWmOrHH/CawHD1GX1bLe6XSKnAxURgWmrPHQA+PIa\r
+M4otEwmFGtVr2aMO7N6OyzwJ92RP40Z8Y+oGj+4q9eVQiiJo/LwAUgLjRWhwmLM0\r
+YMzNcFIE0sv9CQKyFziIN7NfIpunDvq2rxtEVuR1fFiA6fdIoV4JGyJaqvIkxkwW\r
+jpOwcn3vhCzAbsLLWe+O/1/fvF8h5i52IgXm3u8HkXCixY6La3ah8J5ZY9fZd2PT\r
+ETrmy2GCK8+GRLEAjHfbLXPubTE6KIx3kGqP63Uohi9cdAU9fLZOzm9Z6l0pdq1s\r
+K1AobyTdKmdwhd8FWWArLfaqxz3l/09bQCYS/h9wOzfzmMuoT00UDsDdBNBRUHSc\r
+8j/Ouj9C0EzpTTzMidfgcColwugJBhaeizlaSJDWibLDlrQlu6nxlxZCas9izSqo\r
+6UDqv7m/vaCNAGwocoCmfFZkMBEQmrsuNtA1iJck270czAJURVFRHgC+sbXTxunH\r
+rccpoLAnGEcTUmfqYqj2\r
+=eOSi\r
+-----END PGP SIGNATURE-----\r
+\r
+--------------enig211B718926B718A80E8BA9D1--\r