Instagram / Instagram/IGListKit

Including better Swift interfaces/wrapper APIs

Open
#871 2 comments 3 reactions 0 assignees View on GitHub
enhancement proposal question
Dominant language
Objective-C
Stars
13.1k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

## Proposal

CocoaTouch frameworks can include both Swift and ObjC. IGListKit should expose better Swift interfaces by including some Swift wrapper APIs.

For example, we could:

- Provide a proper *generic* `SectionController` in Swift by wrapping `IGListBindingSectionController`, since ObjC lightweight generics aren't really useful in Swift.
- Provide default parameter values to initializers
- Namespace the `IGListDiff` functions and provide defaults for the options

-------

Before, this was blocked by IG internal, but I think this is resolved now? IG internal could re-map the framework to BUCK to *exclude* the `.swift` files (in fact, this should already work by default since the BUCK file should only be including `.h`, `.m`, `.mm`, etc.). Thus, only the OSS version would include Swift.

cc @rnystrom can IG/FB internal handle Swift scale now? 😄

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.