« first day (1 day earlier)      last day (290 days later) » 

4:31 PM
@bogdan: I've been a bit busy, and don't have time to read the new standard proposal, but should be able to look at that in the next few days. A major problem with the current rules' "simplcity" is that there is no way of describing what objects exist at any moment in time based purely on past actions, unless one can accept the idea that an arbitrary number of overlapping objects can exist simultaneously in the same space.
Another major difference between the Standard's approach and mine is that all of the complexity and potential ambiguity in mine is concentrated in one question: is a particular reference "recognizably" derived from another. A nice feature of concentrating such issues on that question is that it avoids any ambiguity about what code means, but instead shifts the question to whether compilers are required to process code consistent with that meaning.
If compiler X can see that reference D is derived from L, processing code consistent with that without regard for whether the rules would have required to recognize the derivation is probably a higher-quality behavior than trying to determine if the rules would allow it to ignore the derivation. BTW, your custom type doesn't seem like much of a solution since it would be incompatible with actual character-type objects such as string literals.
 
5:21 PM
As for the complaint that my rules would be concerned with things that will happen in the future, I would suggest that "ordinary" pointers or references that are never going to be used in any way related to an object should not affect the semantics of that object by their mere existence, but it's impossible to characterize such pointers without reference to the future.
 
 
5 hours later…
10:31 PM
@supercat The bit_cast proposal is really small, don't expect much; a few minutes tops. Regarding the current rules, could you give some more details there? I'm speaking from a C++ perspective, and according to those rules I think you can tell exactly what object is alive in some memory location at a given point in time, based solely on past actions.
I know some things are different in C in these areas, but I don't know exactly what the differences are. If those differences involve the kind of spooky action at a distance that you mention, then I understand your complaints.
However, I can only speak with (a reasonable level of) confidence about the C++ model. In there, as far as I can tell, that doesn't happen, but I'm definitely interested in some more details.
@supercat About my custom type, dataptr couldn't point to a character literal in your example anyway, and in terms of conversions I think it does quite well: individual elements can be freely converted back and forth between my_byte and char (I forgot the assignment operator, but that's just as easy as the others, and it mostly works without it), and you can also reinterpret_cast dataptr to char* (to pass it to, say, strcpy) because, well, char can alias anything :-)
@supercat I was comparing it with the C++ model, as I said.
Sorry: "dataptr couldn't point to a character literal" -> "dataptr couldn't point to a string literal", of course...
 

« first day (1 day earlier)      last day (290 days later) »