mlutze / fcwg

Other
6 stars 3 forks source link

convert interfaces to type classes #18

Open mlutze opened 2 years ago

mlutze commented 2 years ago

Can't really do this without existential types. E.g.

public List<String> getList() { ... }

ought to be wrapped as

pub def [exists a]getList(): a with List[a] = ...
mlutze commented 2 years ago

But we can do this for the input.

mlutze commented 2 years ago

In order to know which interfaces to convert to typeclasses/superclasses we need all interfaces at the same time.

mlutze commented 2 years ago

First iteration: create given instances and extra asX method in instance to allow safe casting to the Java type.