Swift 3.0 Preview!
Pre-releaseWith Swift 3.0 now available in beta, the algorithms project has been updated to reflect this new standard!
Change Summary
There have been many language refinements introduced with Swift 3.0. This has provided an opportunity to also refine numerous areas of the algorithms project. Notable Swift 3.0 proposals now supported include:
- New collection indexing model (SE-0065)
- Remove C-style for-loops with conditions (SE-0007)
- Consistent parameter naming (SE-0046)
- Warning for unused results (SE-0047)
- New implicit unwrapped optionals model (SE-0054)
- Better Translation of Objective-C APIs Into Swift (SE-005)
Existing Swift 2.2 followers should study the revamped Swift 3.0 collection indexing model. This implementation can seen with the refactored String
extension and new Sortable
protocol extension.
Additional Refinements
New Int
and Array
extensions have been added to support pre-existing Math
and Sorting
classes (respectively). Beyond centralizing specific operations, the new design now works directly with the recursive Enum
project example. Finally, a general effort has been made to improve generics (where applicable). This includes refactoring Hash Tables
(renamed Hash Lists
) to support generic objects as well as the Search
and Sorting
algorithms.
Branches
Follow the latest Swift 3.0 code updates here. While Swift 3.0 remains in beta, the master project branch will continue to support Swift 2.2.