Newsgroups: comp.arch Path: csiph.com!feeder.erje.net!2.us.feeder.erje.net!weretis.net!feeder6.news.weretis.net!news.glorb.com!peer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border1.nntp.dca1.giganews.com!border2.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: Fri, 29 Jan 2016 00:23:03 GMT References: Organization: Kithrup Enterprises, Ld. X-Newsreader: trn 4.0-test77 (Sep 1, 2010) Lines: 53 X-Received-Bytes: 3203 X-Received-Body-CRC: 216064677 Xref: csiph.com comp.arch:33254 In article , Ivan Godard wrote: >On 1/25/2016 5:56 PM, Mike Stump wrote: >> In article , >> Stefan Monnier wrote: >>> The kinds of problems that Anton refers to are exactly like that: the >>> intended semantics is very clear >> >> Very clearly undefined. The entire argument is, but I want the world >> to adopt my one true notion of how to define the undefined to the >> exclusion of all other people on the planet. > >Mike, a question: I understand your position on "undefined", Actually, it isn't even really my position. I'm just explaining that the the language standards say, and what the words mean and how the compilers implement those words. I am sympathetic to the idea that everything should be defined. Indeed, I am even sympathetic to, on this target, those bits are defined this way, and every operation for this target, those undefined bits or implementation defined bits _will_ be defined like so, period. Since there are multiple groups of people and what they want is different, the best the compiler can do, would be command line flags (which is a bad solution) or allow the annotation in the source for what they really want. It just requires that someone spec up a way to do it, and the semantics of each when done, then implement it, submit it to clang/gcc and then if the world likes it, submit it to a language standard. >but what would the consequences be if the standard were to change >some or all instances of "undefined" to "implementation defined"? Wouldn't matter any in the case at hand. The problem is two groups that each want something different. Only by adding a bit, to allow the looser to say, but I wanted something different, is there any hope that both camps can be happy. The looser will still be unhappy that they lost and can't control the semantics of the original form, but, at least they can directly write code and get the semantics they wanted. Consider shifting. >> and << are the usual operators. They can only have 1 semantic. The looser would have to use std::lshift or some other spelling. Of course, the other solution, would be to pick a single semantic in the language standard, and just say, that's it, we're done. The people that loose, will curse the language standard, but at least they will know they are the odd man out, and after they die, in the next generation, say, in 60 years, no one will be left to say, I remember the day when that operation wasn't defined.