swiftlang / swiftlang/swift-experimental-string-processing
Adopt lightweight generics for generic functions
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 308
- Forks
- 52
- Avg merge
- 12h 45m
- Merged PRs (30d)
- 2
Description
Functions that take a generic argument should adopt light weight generics and refer to the type directly as the argument type.
For example,
public func contains<C: Collection>(_ other: C) -> Bool
would be
public func contains(_ other: some Collection<Element>) -> Bool
Adoption of standard library types is blocked by https://github.com/apple/swift/pull/41843
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inventorying the generic functions in the project and compare their signatures with the lightweight generics form shown in the issue. Check the status of apple/swift#41843 first, since standard library adoption is blocked there; done means the applicable functions consistently use the direct argument-type syntax.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- api
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100