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

Sane type signatures in implementations of Trials. #60

Open
sageserpent-open opened this issue Mar 16, 2023 · 0 comments
Open

Sane type signatures in implementations of Trials. #60

sageserpent-open opened this issue Mar 16, 2023 · 0 comments

Comments

@sageserpent-open
Copy link
Owner

sageserpent-open commented Mar 16, 2023

The Java and Scala forms of TrialsSkeletalImplementation have odd return types for the methods that yield trials instances - sometimes it's a TrialsSkeletalImplementation, sometimes its a full-fat TrialsImplementation.

In contrast, the methods in the Java and Scala forms of TrialsApiImplementation by and large yield TrialsImplementation.

Furthermore, there are stray definitions of overloads of .several and .lotsOfSize in TrialsImplementation that really belong in the skeleton traits - but the general type signature insanity prevents them from being hoisted elegantly.

This is inconsistent, confusing - but necessary.

The job here is to either face facts and redefine all the return types to be TrialsImplementation, so the skeleton traits are really just places to park methods that really belong to TrialsImplementation but bloat up the source file, or to finesse the types so that the skeleton class methods (and possibly those in the API traits too) all yield the same type - could be TrialsSkeletalImplementation, or maybe a virtual type, or an F-bound type parameter ...

Hopefully this will allow the final hoisting of .several and .lotsOfSize out of TrialsImplementation and into the skeleton traits.

The overall result should be more readable code and less stray bloat in TrialsImplementation.

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