<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 08 Jan 2018, at 21:02, Nate Cook 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; line-break: after-white-space;" class="">I created a playground to explore this question, starting with a minimal subset of the proposal’s additions and building from there. The attached playground demonstrates what’s possible with this subset on the first page, then uses subsequent pages to explore how the main random facilities of the C++ STL work under this model. (In my opinion, they work pretty well!)<div class=""><br class=""></div><div class="">The subset in the playground has three main differences from the proposal:</div><div class=""> - It doesn't include a <font face="Menlo" class="">Randomizable</font> protocol or a <font face="Menlo" class="">random</font> property on numeric types.<br class=""> - It doesn't include the static <font face="Menlo" class="">random(in:)</font> methods on numeric types, either.<br class=""> - The <font face="Menlo" class="">RandomNumberGenerator</font> protocol doesn't have an associated type. Instead, it requires all conforming types to produce <font face="Menlo" class="">UInt64</font> values.<br class=""><br class=""></div><div class="">I’ve tried to include a bit of real-world usage in the playground to demonstrate what writing code would look like with these additions. Please take a look!</div><div class=""><br class=""></div><div class="">Nate</div></div></div></blockquote></div><div class=""><br class=""></div><div class="">+1 to this design</div><br class=""><div class="">Just my 2 cents but this looks very simple and easy to use due to being very consistent. I also like that Randomizable was dropped as I feel it doesn’t hold its weight.</div></body></html>