NSMutableArray does provide O(1) insertion and removal from the start and the
end of the array
(http://ciechanowski.me/blog/2014/03/05/exposing-nsmutablearray/).
I think the reason Swift doesn't use this design is because it stores the data
in a contiguous block of memory.
Elia Cereda
> Il
For the record, I will paste here the answer I have received on StackOverflow.
It adds some useful tips to the info provided by Alex. In short,
Swift modules are somehow equivalent to Java packages, and Swift frameworks to
Java .jars (if we don't get too formal);
Swift (sub)modules can be visibl
It seems to me that some of these concerns could be fixed by returning
ArraySlice instead of Array on popFirst(). Then you’d have similar
performance expectations and explicit copying like with String / Substring.
Geordie
Elia Cereda via swift-users schrieb am Mo. 18. Sep.
2017 um 11:12:
> NSM
On 17.09.2017 13:25, Quinn "The Eskimo!" via swift-users wrote:
On 15 Sep 2017, at 21:35, Vladimir.S via swift-users
wrote:
… for me it is very strange decision to disallow a method because it is
'expensive'.
That’s pretty normal for Swift standard library protocols, which define not
jus
On 18 Sep 2017, at 13:52, Vladimir.S wrote:
> Can't understand/accept this, sorry.
You seem to be very invested in how Swift /should/ work, rather than how it
/does/ work. I’m sympathetic with that position but it’s really a topic of
conversation for swift-evolution rather than swift-users.