From mboxrd@z Thu Jan 1 00:00:00 1970 To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> In-reply-to: Your message of "Mon, 29 Oct 2012 23:58:23 -0000." References: <15723310.yIARpoJMSL@coil> <4824335454f1b1d47dbc8439b4af8ea3@kw.quanstro.net> <20121029223541.8C198B827@mail.bitblocks.com> <0f05642b113b3ecfc160e82a9ca4db32@brasstown.quanstro.net> <20121029232652.5160BB827@mail.bitblocks.com> <74f73b64cc6de4a3bd10367591439816@kw.quanstro.net> Date: Mon, 29 Oct 2012 17:52:48 -0700 From: Bakul Shah Message-Id: <20121030005248.65C58B827@mail.bitblocks.com> Subject: Re: [9fans] caveat... optimizer? the `zero and forget' thread on HN Topicbox-Message-UUID: ccc59de0-ead7-11e9-9d60-3106f5b1d025 On Mon, 29 Oct 2012 23:58:23 -0000 Charles Forsyth wrote: > > "But my point was that a programmer should understand the standard" > > But suppose the standard does not evidently aim to be understood, in the > generally understood meaning of "understood", > or there are more words in the standard than will ever appear in the > programmer's own programs? The C standard is not too hard to understand. For something worse try one of those ITU standards! Try IEEE 802 standards! I have had to read the Bridging standard many many more times (compared to the C standard) to make sense of it. The standards *shouldn't* be so horrible but they are. And one does what is needed to get the job done. > Worse! "Standard" doesn't imply a fixed point ("oh, that syntax/semantics > is so last year!"). > I think looking into memset and deciding it's not worthwhile calling is > perhaps overly enthusiastic. I ask again. Who decides where the line is drawn? I think that in a competitive environment the only thing that can restrain people is the standard. Unfortunately. > Actually, it's wrong, because it overlooks the side-effect, and an > optimiser for a language with side-effects > should take that into account. They put in "volatile" to ensure side-effects happen. Hasn't worked too well.