<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Oct 3, 2014, at 10:09 AM, Aaron Ballman <<a href="mailto:aaron@aaronballman.com" class="">aaron@aaronballman.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">On Fri, Oct 3, 2014 at 1:04 PM, Argyrios Kyrtzidis <</span><a href="mailto:kyrtzidis@apple.com" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">kyrtzidis@apple.com</a><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">> wrote:</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class="">On Oct 3, 2014, at 9:52 AM, Aaron Ballman <<a href="mailto:aaron@aaronballman.com" class="">aaron@aaronballman.com</a>> wrote:<br class=""><br class="">On Fri, Oct 3, 2014 at 12:26 PM, Argyrios Kyrtzidis <<a href="mailto:kyrtzidis@apple.com" class="">kyrtzidis@apple.com</a>><br class="">wrote:<br class=""><br class=""><br class="">On Oct 1, 2014, at 9:57 AM, Aaron Ballman <<a href="mailto:aaron@aaronballman.com" class="">aaron@aaronballman.com</a>> wrote:<br class=""><br class="">On Wed, Oct 1, 2014 at 12:43 PM, jahanian <<a href="mailto:fjahanian@apple.com" class="">fjahanian@apple.com</a>> wrote:<br class=""><br class=""><br class="">On Oct 1, 2014, at 5:44 AM, Aaron Ballman <<a href="mailto:aaron@aaronballman.com" class="">aaron@aaronballman.com</a>> wrote:<br class=""><br class="">On Tue, Sep 30, 2014 at 7:52 PM, jahanian <<a href="mailto:fjahanian@apple.com" class="">fjahanian@apple.com</a>> wrote:<br class=""><br class="">Sure. Our primary interest is in their use in availability/deprecated<br class="">attributes.<br class=""><br class="">An example would be:<br class="">@protocol P<br class="">- (void)proto_method<br class="">__attribute__((availability(macosx,introduced=10_1_0,deprecated=10_2)));<br class="">@end<br class=""><br class="">Instead of:<br class="">@protocol P<br class="">- (void)proto_method<br class="">__attribute__((availability(macosx,introduced=10.1.0,deprecated=10.2)));<br class="">@end<br class=""><br class="">But, 'major[.minor[.subminor]]’ are parsed and ‘.’ are checked for,<br class="">irrespective of their use.<br class="">So, rather than special case for what we need, I am proposing to allow them<br class="">everywhere.<br class=""><br class=""><br class="">What do you mean by "everywhere?" I'm a bit confused. When I read your<br class="">original email, I thought you were talking about changing command line<br class="">argument parsing for places where version numbers matter so that _ and<br class="">. were interchangeable. Then Doug brought up std::tuple, and now<br class="">you're talking about availability attributes. A bit more detailed<br class="">scope information about what you are proposing would be useful. :-)<br class=""><br class=""><br class="">Parser::ParseVersionTuple(…) is where 'major[.minor[.subminor]]’ is parsed.<br class="">I am suggesting to modify it to recognize ‘_’ as separator. So, I propose to<br class="">change<br class="">Parser::ParseVersionTuple(…) to also accept ‘major[_minor[_subminor]]’<br class="">syntax as well.<br class="">As an example, I brought up an example of versioning in availability<br class="">attribute and showed<br class="">how this change will allow 10_1_0 as alternative version. Hope it is clear.<br class=""><br class=""><br class="">Thank you for the clarification! So long as VersionTuple remembers<br class="">which form is used (period or underscore) so that it can be printed in<br class="">diagnostics<br class=""><br class=""><br class="">Hi Aaron,<br class=""><br class="">I don’t think changing the version form that users see in diagnostics is<br class="">desirable.<br class=""><br class="">The motivating factor for allowing ‘_’ as version form is to get rid of a<br class="">swath of boilerplate macros that the availability headers go through when<br class="">there’s a new version, in order to do the conversion and satisfy the<br class="">availability attribute.<br class="">We are proposing that ‘_’ be accepted to vastly simplify the situation but<br class="">whether the availability attribute got ‘_’ or ‘.’ for defining the version<br class="">numbers is an underlying detail that should not be exposed to users.<br class=""><br class=""><br class="">That's reasonable to me, thank you for the explanation!<br class=""><br class="">Users have been seeing dot-separated versions in diagnostics forever,<br class="">suddenly changing the diagnostics to the less aesthetically pleasing<br class="">underscore-separated version provides no benefit at all and can only lead to<br class="">minor confusion.<br class=""><br class=""><br class="">Agreed, for your use case. A bit less agreed for the use case where a<br class="">user writes the version tuple manually using an underscore, and it<br class="">gets printed using a period. But I think that's far less likely to be<br class="">an issue than the macro use case.<br class=""><br class=""><br class="">Glad you agree and thanks for your feedback!<br class=""><br class=""><br class="">We have ways of telling whether something was written due to macros or<br class="">not, so this is solvable,<br class=""><br class=""><br class="">This may be a bit bike-shedding at this point but changing whether a<br class="">diagnostic prints dot-version or underscore-version based on whether the<br class="">version text came from a macro or not, seems like a bit inconsistent and<br class="">confusing rule to me.<br class="">The rule “you can define the version for the availability attribute with<br class="">dots or underscores, but diagnostics always print dots as the canonical<br class="">form” seems better to me.<br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">I can live with that reasoning in this case, but I have a preference</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">for always showing the user what they wrote in diagnostics to reduce</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">confusion. It is confusing when you get a diagnostic that reads "Blah</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">blah blah is wrong" and you go "but I didn't write blah blah blah, so</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">what is the compiler complaining about?”</span></div></blockquote><div><br class=""></div><div>I see your point, but in this particular case, writing the version with underscore instead of dots is a very uncommon case (I mean we just introduced it ;-) so it will be a conscious choice for convenience purposes (compared to the dot form) not because the API author <i class="">really</i> wants to show underscores in the diagnostics.</div><br class=""><blockquote type="cite" class=""><div class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">~Aaron</span></div></blockquote></div><br class=""></body></html>