Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support automatic derivation of Trials<X> for a structured X in Java. #6

Open
sageserpent-open opened this issue May 10, 2021 · 0 comments

Comments

@sageserpent-open
Copy link
Owner

sageserpent-open commented May 10, 2021

On the Scala side, there is already support for automatic derivation of Trials[X] where X is some algebraic data type that heads a hierarchy of sum and product types - courtesy of Magnolia - nice job there.

What we lack is the same experience on the Java side - and for that matter for classes in Scala that are not sum / product types, ie. 'conventional OO classes in Scala'.

One approach would be to use the public constructors of X to guide the assembly of a Trials<X>, using a mixture of reflection and ByteBuddy for the implementation.

Ideally this should work for both Java and Scala code, although Java is the priority here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant