From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 29 Oct 2012 11:12:42 +0100 From: tlaronde@polynum.com To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Message-ID: <20121029101242.GA1252@polynum.com> References: <15723310.yIARpoJMSL@coil> Mime-Version: 1.0 In-Reply-To: <15723310.yIARpoJMSL@coil> User-Agent: Mutt/1.4.2.3i Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: Re: [9fans] caveat... optimizer? the `zero and forget' thread on HN Topicbox-Message-UUID: cb8d34ce-ead7-11e9-9d60-3106f5b1d025 On Mon, Oct 29, 2012 at 10:45:33AM +0100, dexen deVries wrote: > http://news.ycombinator.com/item?id=4711346 > > 9fans says, ``no room in the compiler world for amateurs''. what's your take > on the above fubar? That when one does programming, one tries to have not fuzzy behavior, that is to know exactly what the code does. With some compilers, a programmer can make assumptions valid with the sources and not anymore valid after compiler acrobatics, first of all optimizations (and I thought volatile was precisely here to say: don't try to guess ; leave this alone). The worst being the GCC example when one has to explicitely disable some acrobatics that are done by default. The correct behavior should be to only switch on "features" when compiler is explicitely instructed to do so (or, if some actions are done by default because it is proved that this does not invalidate code assumptions, there should be a limit number of rules explicitely stated in the man pages; the plan9 man pages, and the Ken Thompson's style are remarquable for this: short text/sources, with what is done and what is not guaranteed). The man to texinfo transition has not improved the information but, on the contrary, the size and complexity of informations, decreasing the ratio signal/noise. The first principle of safety (the theme of the article with zeroing critical memory) is smallest and clearest sources. These are not the bazaar aim. Neither on the compiler side. -- Thierry Laronde http://www.kergis.com/ Key fingerprint = 0FF7 E906 FBAF FE95 FD89 250D 52B1 AE95 6006 F40C