<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><div id="bloop_customfont" style="margin: 0px;">Well, it's not a problem to implement such diagnostics, but I still see some disadvantages.</div><div id="bloop_customfont" style="margin: 0px;">Here is my random thoughts:</div><div id="bloop_customfont" style="margin: 0px;">NSEdgeInsets (and corresponding NSValue factory method) available for both iOS and OS X triples starting from 8.0 and 10.10 respectively. To get this error (or warning, doesn't matter) user need to compile his code with an earlier version of SDK, which means that NSEdgeInsets and corresponding method are not available there and compilation will fail earlier, it will be even impossible to create a variable of type NSEdgeInsets.</div><div id="bloop_customfont" style="margin: 0px;">On the other hand I know a few projects/developers who is doing some backports by defining the same interface for the earlier SDKs by introducing the same classes and/or by extending existing ones via categories (personally I did this for NSArray/NSDictionary to add support of subscripting).</div><div id="bloop_customfont" style="margin: 0px;">In case of these restrictions (errors/warnings) we'll add the barrier, which might provide more frustration than safety.</div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;">Another one disadvantage is that the code will be even more tightly coupled with NSFoundation and won't be as generic as it is right now, because of code like this:</div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;">  if (type == NSEdgeInsets) {</div><div id="bloop_customfont" style="margin: 0px;">    if (triple.os == iOS && triple.version < 8.0) {</div><div id="bloop_customfont" style="margin: 0px;">      emit_warning("unavailable on iOS");</div><div id="bloop_customfont" style="margin: 0px;">    }</div><div id="bloop_customfont" style="margin: 0px;">    if (triple.os == OSX && triple.version < 10.10) {</div><div id="bloop_customfont" style="margin: 0px;">      emit_warning("unavailable on osx");</div><div id="bloop_customfont" style="margin: 0px;">    }</div><div id="bloop_customfont" style="margin: 0px;">  }</div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;">But, yes, it's just my opinion and the last word is yours :)</div></div> <div id="bloop_sign_1420834133058338048" class="bloop_sign"><div style="font-family:helvetica,arial;font-size:13px">-- <br>AlexDenisov</div><div style="font-family:helvetica,arial;font-size:13px">Software Engineer, <a href="https://github.com/AlexDenisov">https://github.com/AlexDenisov</a></div></div> <br><p style="color:#000;">On 9 Jan 2015 at 21:04:51, jahanian (<a href="mailto:fjahanian@apple.com">fjahanian@apple.com</a>) wrote:</p> <blockquote type="cite" class="clean_bq"><span><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div></div><div>



<title></title>


<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Jan 9, 2015, at 11:41 AM, AlexDenisov <<a href="mailto:1101.debian@gmail.com" class="">1101.debian@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div id="bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; 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; margin: 0px;" class="">
<div class="">
<blockquote type="cite" class="clean_bq" style="font-family: Helvetica, Arial; font-size: 13px; 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;">
<div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;">We may not
support boxing of any pointer types after all </div>
<div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;">(as the
underlying API does not manage the collected object).</div>
<div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;">So, final patch
may need to address that.</div>
</div>
</blockquote>
</div>
<p class="">No problem. To be honest, I don’t see real benefits of
having such ability, it was a silly decision to include this
functionality (motivated by ‘because I can’).</p>
<div class="">
<blockquote type="cite" class="clean_bq" style="font-family: Helvetica, Arial; font-size: 13px; 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;">
<div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;">Please provide
more tests </div>
<div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;">for
NSEdgeInsets and specifically, see that diagnostics come out
when </div>
<div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;">deployment
target does not support it.</div>
</div>
</blockquote>
</div>
<p class="">What kind of tests should I add? It has tests for Sema
and CodeGen, did I forget/missed something?</p>
<div class=""><br class=""></div>
</div>
</div>
</blockquote>
<div><br class=""></div>
Test should show that if some one uses auto boxing
for <span style="font-family: Menlo; font-size: 11px;" class="">NSEdgeInsets in deployment targets that do not support it, a
proper warning is</span></div>
<div><font face="Menlo" class=""><span style="font-size: 11px;" class="">being issued. You may have this test already but I
could not locate it.</span></font></div>
<div><font face="Menlo" class=""><span style="font-size: 11px;" class="">- Fariborz</span></font></div>
<div><font face="Menlo" class=""><span style="font-size: 11px;" class=""><br class=""></span></font>
<blockquote type="cite" class="">
<div class="">
<blockquote type="cite" class="clean_bq" style="font-family: Helvetica, Arial; font-size: 13px; 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;">
<div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div class="">
<div class="">
<blockquote type="cite" class="">
<div class="">
<blockquote type="cite" class="clean_bq" style="font-family: Helvetica, Arial; font-size: 13px; 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;">
<div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div class="">
<div class=""><span class=""><br class=""></span></div>
<div class=""><span class="">- Fariborz</span></div>
</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
<br class="">


</div></div></span></blockquote></body></html>