Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert to Swift 2.0 syntax #1

Merged
merged 7 commits into from
Sep 30, 2015
Merged

Convert to Swift 2.0 syntax #1

merged 7 commits into from
Sep 30, 2015

Conversation

mroth
Copy link
Owner

@mroth mroth commented Sep 30, 2015

This is mostly just the conversion to get the project in it’s current WIP state to compile and run on the latest version of Xcode (7.0.1).

Better optimizations may come later.

Auto converter probably should have caught these, oh well
This seems to be “in transition” in Swift/Cocoa, in a very annoying
way.  working with NSURL still requires a lot of the path methods from
NSString, and since they are no longer bridged to String there is a lot
of taking Strings (that were bridged from NSString to begin with) and
bridging them right back to NSString to get access to those methods.

The cleanest thing to do would be to just bridge all the path methods
back into String, but since I suspect they will eventually go away so
start migrating to the extra verbiage of dealing with NSURLs, which
makes me sad because it’s moving further out of the Swift STDLIB and
back into framework classes.  Sigh.

This also ends up with having to use NSURL.path! a lot, which I
*really* don’t like… but I see no sane alternative yet.
much nicer for clean up long method with early return when have to
unbind an optional
mroth added a commit that referenced this pull request Sep 30, 2015
Convert to Swift 2.0 syntax
@mroth mroth merged commit 3f77342 into master Sep 30, 2015
@mroth mroth deleted the swift2 branch September 30, 2015 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant