<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Nov 20, 2017, at 4:17 PM, Jonathan Hull via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I think the functionality is good, but I would like to see some thought on what future values could be to see if this is the best name/structure.<br class=""></div></div></blockquote><div><br class=""></div><div>As mentioned in a bit more detail in the other email I just posted, this proposal is to reflect values that occur in the "environment" field of the target triple; therefore possible future values would only be those that occur in practice in different toolchain variants: different libcs, different ABIs, similar miscellaneous variation within a given arch-vendor-os triple.</div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><div class="">If it is just going to be the concept of a simulator, then something like isSimulated() might be better. In the current form, I think we should have both ‘Simulator’ and ‘Device’ as options.</div></div></div></div></blockquote><div><br class=""></div><div>Ah yes, I forgot to mention this in the "alternatives considered" section. An earlier draft did indeed include "device" as a synonym for non-simulator, but this was noted as conflicting with the way the environment field of triples actually works: it's optional and may be either empty or one of several specific values, of which 'device' is not an option. I.e. one does not specify non-simulator by saying arm64-apple-tvos-device, one simply says arm64-apple-tvos, and omits the -simulator 4th field.</div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">I would also like to see something shorter than targetEnvironment(), but it is somewhat infrequently used, so it isn’t that big a deal. It is just compared to os() and arch(), this is kind of a beast. It is a power user thing, so maybe something like ‘env()’ would work? I normally try to avoid abbreviations, but we have arch() as precedent. The word ‘Simulator’ should be what stands out...</div></div></div></blockquote><div><br class=""></div><div>As mentioned in the "alternatives considered" section, "env" or "environment" was considered, but several people noted this is very easily confused as a means to access environment variables in the compilation process, which this proposal is not.</div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Would Testing be a possible future environment?</div></div></div></blockquote><div><br class=""></div><div>I do not believe so, it's not a way people presently use the environment field of a target triple.</div><div><br class=""></div><div>-Graydon</div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><blockquote type="cite" class=""><div class=""><ul class="" style="font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; -webkit-print-color-adjust: exact; margin: 15px 0px; padding-left: 30px; font-family: Helvetica, arial, sans-serif; background-color: rgb(255, 255, 255);"><li class="" style="-webkit-print-color-adjust: exact; margin: 0px;"><p class="" style="-webkit-print-color-adjust: exact; margin: 0px 0px 15px;">Is the problem being addressed significant enough to warrant a change to Swift?</p></li></ul></div></blockquote>Yes, Definitely!</div><div class=""><br class=""><blockquote type="cite" class=""><div class=""><ul class="" style="font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; -webkit-print-color-adjust: exact; margin: 15px 0px; padding-left: 30px; font-family: Helvetica, arial, sans-serif; background-color: rgb(255, 255, 255);"><li class="" style="-webkit-print-color-adjust: exact; margin: 0px;"><p class="" style="-webkit-print-color-adjust: exact; margin: 0px 0px 15px;">Does this proposal fit well with the feel and direction of Swift?</p></li></ul></div></blockquote>Yes.<br class=""><blockquote type="cite" class=""><div class=""><ul class="" style="font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; -webkit-print-color-adjust: exact; margin: 15px 0px; padding-left: 30px; font-family: Helvetica, arial, sans-serif; background-color: rgb(255, 255, 255);"><li class="" style="-webkit-print-color-adjust: exact; margin: 0px;"><p class="" style="-webkit-print-color-adjust: exact; margin: 0px 0px 15px;">If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?</p></li></ul></div></blockquote>I guess Objective C had something like this as well, which was more powerful, but also more messy.<br class=""><blockquote type="cite" class=""><div class=""><ul class="" style="font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; -webkit-print-color-adjust: exact; margin: 15px 0px; padding-left: 30px; font-family: Helvetica, arial, sans-serif; background-color: rgb(255, 255, 255);"><li class="" style="-webkit-print-color-adjust: exact; margin: 0px;"><p class="" style="-webkit-print-color-adjust: exact; margin: 0px 0px 15px;">How much effort did you put into your review? A glance, a quick reading, or an in-depth study?</p></li></ul></div></blockquote>Quick Read</div><br class=""></div>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></body></html>