<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><span></span></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><span></span></div><div>There have been several threads to add specific functions or types to the stdlib:<div>-&nbsp;<span style="font-family: 'Helvetica Neue';">Either in the Swift Standard Library</span></div><div><span style="font-family: 'Helvetica Neue';">-&nbsp;</span><span style="font-family: 'Helvetica Neue';">Proposal: Add scan, takeWhile, dropWhile, and iterate to the stdlib</span></div><div><span style="font-family: 'Helvetica Neue';">- Higher Kinded Types (Monads, Functors, etc.)</span></div><div><span style="font-family: 'Helvetica Neue';">-&nbsp;</span><span style="color: rgb(76, 76, 76); font-family: 'Helvetica Neue';">Adding a new filter method which returns 2 arrays</span></div><div><span style="color: rgb(76, 76, 76); font-family: 'Helvetica Neue';">-&nbsp;</span><span style="font-family: 'Helvetica Neue';">Add replace(_:with:) function to the stdlib</span></div><div><span style="font-family: 'Helvetica Neue';">- map-like operation that returns a dictionary</span></div><div><span style="font-family: 'Helvetica Neue';">-&nbsp;</span><span style="font-family: 'Helvetica Neue';">Rectangles and other common structures.</span></div><div><span style="font-family: 'Helvetica Neue';">-&nbsp;</span><span style="font-family: 'Helvetica Neue';">Add zip2WithNilPadding function</span></div><div><span style="font-family: 'Helvetica Neue';">-&nbsp;</span><span style="font-family: 'Helvetica Neue';">Add types BufferedSequence, BufferedGenerator</span></div><div><font face="Helvetica Neue">-&nbsp;… (guess there are some that I missed&nbsp;— I didn't look at last years threads at all).</font></div><div><font face="Helvetica Neue"><br></font></div><div><font face="Helvetica Neue">Afair, none of those ideas turned into real proposals, and I think that keeping stdlib small is a good goal.</font></div><div><font face="Helvetica Neue"><br></font></div><div><font face="Helvetica Neue">Nonetheless, there are plenty of data structures&nbsp;and algorithms that will be used in many places by many different teams, and each of them might write its own implementation. That's imho no big problem for algorithms, but for types, it will most likely lead to real annoyance.</font></div><div><font face="Helvetica Neue"><br></font></div><div><font face="Helvetica Neue">I hope that we will soon have a great package manager for Swift, but I don't think that will solve this issue completely:</font></div></div><div><font face="Helvetica Neue">I wouldn't import a big third-party framework just because a tiny function like "dropWhile" could make my code more elegant...</font></div><div><font face="Helvetica Neue"><br></font></div><div><font face="Helvetica Neue">Of course, some widely accepted libs might rise and improve interoperability, but it is hard to predict how our ecosystem will evolve, and you don't have to wait for the future to see the what could happen when there is no common base</font><font face="Helvetica Neue">:</font></div><div><span style="font-family: 'Helvetica Neue';">Just take a look at SCNQuaternion, GLQuaternion and CMQuaternion.</span></div><div><br></div><div><span style="font-family: 'Helvetica Neue';">Instead of asking to pollute stdlib with stuff like 3d transformations, I'd prefer a set of general purpose libraries under supervision by the Swift team:</span></div><div><span style="font-family: 'Helvetica Neue';">It could be a great way for "outsiders" to get into Swift development, and most likely wouldn't put to much stress and responsibility on the shoulders of each "manager".</span></div><div><font face="Helvetica Neue">It also could take pressure from the stdlib (and this mailinglist :)</font></div><div><font face="Helvetica Neue"><br></font></div><div><font face="Helvetica Neue">Beside fields of application (graphics, images, music, algebra, statistics, pattern matching, machine learning, graph theorie... whatever raises enough interest), there could also be libraries to support concepts like functional programming.</font></div><div><font face="Helvetica Neue"><br></font></div><div><font face="Helvetica Neue">Best regards,</font></div><div><font face="Helvetica Neue">Tino</font></div></div><div><br></div></body></html>