swiftlang / swiftlang/swift-java

jextract: support all other functional interfaces (Supplier and friends)

Open
#101 1 comment 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.