SwiftBaseLibrary: Swift mutable semantics methods .reverse()/substact()/intersect should be replaced with their immutable counterpart to match Silver/Swift semantics

SwiftBaseLibrary implements .reverse()/substact()/intersect() methods who have immutable semantics, however their Swift 3 conterparts have opposite semantics -> they are mutable and instead of returning a resulting collection, modify the caller.

Therefore SwiftBaseLibrary .reverse()/substact()/intersect() should be deprecated in favor of swift semantics matching .reversed()/.intersection()/.subtracting().

Please reference pull request: https://github.com/remobjects/SwiftBaseLibrary/pull/4

That pull request has a lot of changes that seem unrelated to this (e.g. adding type aliases such as +public typealias SignedInteger = ISignedIntegerType?

Can you create one with just the relevant changes?

thanx!

@mh I guess I didn’t describe it properly. SignedInteger and other numeric aliases has been added since their naming changed in Swifr3, I haven’t removed any Swift2 numeric protocol aliases to make sure no existing stuff breaks.

You mean I should seperate them into 2 pull requests?

please, yes.

@mh: Modified, please take a look. Thanks.

Thanx. for the integer protocols. does Swift 3 keep both names, with and w/o Type suffix? if not, woudln’t it make more sense to rename those, rather than alias? (as a side node, these new names are terrible, IMHO :wink:

I did merge the other change.

Thanks for merging the changes. No swift3 doesn’t keep the both names.

I aliased them so that existing elements code that might utilize swift2 protocol names won’t break.

I should have marked them with @deprecated I guess. It can be done in two steps. Deprecating them that will issue the warning, then in the next more or less primary release deleting the old ones.

Silver understands @Deprecated right?

I’d just go for the new names in one go, an drop the old ones. If we’d keep all Swift 2 names around everywhere, we’d go insane.

@mh: Alright, should I remove the previous ones in my pull request or just close it?

You can adjust the pull request or create a new one, whatever is easier for you.