swiftlang / swiftlang/swift-java
jextract: support all other functional interfaces (Supplier and friends)
Open
Nobody has claimed this yet.
feature:jextract
good first issue
help wanted
- Dominant language
- Swift
- Stars
- 1.2k
- Forks
- 123
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 16
Description
Similar how we did Runnable in https://github.com/swiftlang/swift-java/pull/100 we should be able to import various shapes of functions like (Int) -> Int and others into the various j.u.f. interfaces
- BiConsumer<T,U>
- BiFunction<T,U,R>
- BinaryOperator
- BiPredicate<T,U>
- BooleanSupplier
- Consumer
- DoubleBinaryOperator
- DoubleConsumer
- DoubleFunction
- DoublePredicate
- DoubleSupplier
- DoubleToIntFunction
- DoubleToLongFunction
- DoubleUnaryOperator
- Function<T,R>
- IntBinaryOperator
- IntConsumer
- IntFunction
- IntPredicate
- IntSupplier
- IntToDoubleFunction
- IntToLongFunction
- IntUnaryOperator
- LongBinaryOperator
- LongConsumer
- LongFunction
- LongPredicate
- LongSupplier
- LongToDoubleFunction
- LongToIntFunction
- LongUnaryOperator
- ObjDoubleConsumer
- ObjIntConsumer
- ObjLongConsumer
- Predicate
- Supplier
- ToDoubleBiFunction<T,U>
- ToDoubleFunction
- ToIntBiFunction<T,U>
- ToIntFunction
- ToLongBiFunction<T,U>
- ToLongFunction
- UnaryOperator
we can do the non generic ones first
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 reviewing the jextract work and the Runnable precedent in pull request 100. Use the listed java.util.function interfaces to define the scope, beginning with the non-generic ones as suggested. Done means the supported function shapes import into the corresponding interfaces.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, swift
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 54/100