Ranges and Intervals in Swift
oleb.net
oleb.net
Swift should be open sourced this year[1], though it will be interesting what strategy will apple use for contributions. I mean, who will say which feature should be developed and which not? Because if Apple will continue to do it their way, will open sourcing swift will change anything?
That said, some things are fundamental to the language and its architecture, and those are the things Apple is developing internally before its open-sourcing. So it is possible the most important stuff will not be getting help from the masses.
What do you mean by this? In the implementation, yes, is a poor optimization strategy, but for the user of the language, shouldn't that be what appears to be happening? Mutable data structures and functional programming mix worse than immutable data structure and functional programming.
> Or placing stateful actions into the same API set as FP expressions makes little semantic sense and discourages any sense of thoughtful structure to the different paradigms.
This is incredibly weird. You cannot get an array in Swift with an item at an index removed. There is a function to remove an item at an index from a mutable array[1], but no way to remove an index and return a new array. You can't do it. But you can "filter(:)", which returns a new array, and you can't "filter(:)" a mutable array to alter it. ...wat?
[1] - a thing that I'd argue shouldn't exist, when we must have mutability, it should be mutable references to constant arrays
Why? What does it offer?