Tino
(Tino)
June 23, 2018, 6:41pm
10
... but that would possibly cause an endless discussion wether the library should be called Random
or DefaultRandomNumberGeneratorModule
;-)
Imho something comparable to C++ Boost would be a fantastic way to speed up development, but apparently, there is no big support for such a concept in Swift
To not only point on issues Random
might have, there's at least one other big topic that suffers from the same problem in a different way:
While the API for RNGs was decided (at least partially) blindfold, there has been lots of activity regarding container types - and none of those ideas became real proposals... the current stdlib proves that something like SortedArray
, OrderedSet
, MultiSet
or LinkedList
does not have to be in that prominent location, but at the same time, the complete lack of some very basic structures and algorithms feels odd.
Hello everyone,
We've seen some increased discussion recently about the idea of a struct OrderedSet to complement the Foundation class NSOrderedSet type. This is something we've been thinking about for a while. I think this is a great opportunity to bring the community together to collaborate on a new API for Foundation.
I'd like to start a discussion here, and am looking for help from the community to develop a full API proposal for this type. I've discussed this idea with members of the Swif…
I'm looking to take the community temperature about adding CountedSet to Swift Foundation/Standard Library. This is a Swift native version of NSCountedSet with the following preliminary design:
/// An unordered collection of unique hashable elements that
/// may appear more than once in the collection.
///
/// Each distinct value inserted into an `CountedSet`
/// has an associated counter. `CountedSet` keeps
/// track of the number of times each value is inserted.
/// That value must be removed…
Hey all,
I'm going through the list of common sequence APIs that I've had to implement multiple times in several projects and I'd like to pitch a couple of APIs on sequence, modulo naming.
Chaining
/// Presents a sequence of the elements in `firstSequence` followed by those in `secondSequence`.
firstSequence.followed(by: secondSequence)
Repeating
/// An infinite sequence of containing the elements of `sequence` repeated forever.
sequence.repeated(.forever)
/// An sequence containing the el…
Here's a draft proposal of introducing a SortedCollection protocol. The proposal doesn't include a concrete type that implements this. However, I wouldn't mind any suggestions for a concrete type, but would valid reasons over any other types.
Sorted Collections
Proposal: SE-NNNN
Authors: Letanyan Arumugam
Review Manager: TBD
Status: Awaiting implementation
During the review process, add the following fields as needed:
Implementation: apple/swift#NNNNN
Decision Notes: Rationale , Additi…
https://forums.swift.org/t/weak-reference-collections/11974
Add Various Zip-Related Types and Operations
Proposal: SE-NNNN
Authors: Dennis Vennink
Review Manager: To be determined
Implementation: dennisvennink/bdf3c52ae1d9a3750ec3507ab3262921
Previous Discussions: 1 , 2 , 3
Status: Awaiting implementation
Introduction
This proposal adds various zip-related types and operations to the standard library.
Motivation
In functional programming, zip and unzip are irreplaceable operations. zip maps an n-tuple of sequences to a sequence of n-tuples. It e…