Newsgroups: comp.arch Path: csiph.com!weretis.net!feeder6.news.weretis.net!news.glorb.com!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!kithrup.com!mrs From: mrs@kithrup.com (Mike Stump) Subject: Re: The freedom that give us C++ and C Message-ID: Date: Sat, 6 Feb 2016 10:13:31 GMT References: Organization: Kithrup Enterprises, Ld. X-Newsreader: trn 4.0-test77 (Sep 1, 2010) Lines: 28 X-Received-Bytes: 2353 X-Received-Body-CRC: 2160641613 Xref: csiph.com comp.arch:33511 In article , Nick Maclaren wrote: >In article , >Precisely. But is also means that, unless you have an unusual level >of knowledge of the minutiae of the standard, and an even more >unusual level of experience with variant implementations, you are >quite likely to have major difficulty writing genuinely portable >code. Which is where I came in. I reject that. One has trouble writing truely portable code, because one wants to use a windowing system, and C doesn't have one. Because one wants to know if the filesystem is case sentive or not, and the standard doesn't have a way to inform you of that. Because one wants to use mysql, and the standard doesn't define mysql and doesn't mandate that each system have mysql on it. These are the barriers to writing portable code. Code that reads /proc, but, on this system, /proc is different, or simply doesn't exist. Heck, even multiprocess code that uses fork isn't portable, as first, windows doesn't really have it, and C standard doesn't define it. And then, you have trouble writing truly portable code, because microsoft's compiler doesn't even try and match the language standard. It isn't because they can't read and implement the standard, it is because they don't want to. In the early years, the compilers were soo buggy that any complex code was a sure fire way to find a bug that would just hose you. These are 99.99% of the problems one actually faces when writing portable code. You can know this, by taking code, and runing it on random systems. When you examine all the failures over all software, over all time, over all systems, you will see the trend, and it is very clear. Almost never are the problems, the problems you describe.