<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 Apr 10, 2016, at 2:00 PM, Milos Rankovic via swift-users <<a href="mailto:swift-users@swift.org" class="">swift-users@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=""><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class=""><font face="Arial" size="2" class="">Thank you, Jens, for your response. </font></div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class=""><font face="Arial" size="2" class=""><br class=""></font></div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class=""><font face="Arial" size="2" class="">I do however disagree with both points you are making. First, you write that sampling collection elements</font><span style="font-family: Arial; font-size: small;" class=""> </span><span style="font-family: Arial; font-size: small;" class="">at random</span><span style="font-family: Arial; font-size: small;" class=""> is:</span></div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69); min-height: 14px;" class=""><font face="Arial" size="2" class=""><br class=""></font></div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class=""><blockquote type="cite" style="font-family: -webkit-standard;" class="">a pretty obscure feature</blockquote></div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69); min-height: 14px;" class=""><font face="Arial" size="2" class=""><br class=""></font></div><div style="margin: 0px; line-height: normal;" class=""><font face="Arial" size="2" class=""><font color="#454545" class="">But how can this be? When you teach students how to implement a card playing game in Swift, how do you shuffle the deck? And when you test your code, do you not feed your methods with randomly generated and sampled simulated data, or do so at random intervals? And when you’re simply checking out an idea in the playground, do you not want randomly sampled or reshuffled inputs? Should any of these activities qualify as obscure?</font></font></div></div></div></blockquote><div><br class=""></div><div>I personally would vote against this. I do not think it's the role of a core language to worry about things like distributions, bias, and sampling.</div><div><br class=""></div><div>At the same time, I agree it's a very common task for playgrounds. I've developed a lot of material for everything from random colors and shapes to placeholder APIs to shuffles.</div><div><br class=""></div><div>Best regards,</div><div><br class=""></div><div>-- E</div><div><br class=""></div></div></body></html>