Open sageserpent-open opened 1 year ago
Now I remember why I didn't do this before - there is a lot of delegation from whatever implements CharacterTrials
to usual trials implementation. Unless the implementation of TrialsApi
is refactored to include some kind of flexible type on the trials it yields (analogous to how SupplyToSyntax
is specialised for tuples), this is going to be very messy.
Could use ByteBuddy to set up a delegating proxy of type CharacterTrials
that forwards on to the real implementation?
Maybe that second approach would also be useful in the context of #56?
Putting this on to the back burner for now...
Currently, one builds a
Trials<String>
via something like this:api().characters('a', 'z').collections(Builder::stringBuilder)
.That is a bit prolix: it would be nicer to write:
api.characters('a', 'z').strings()
instead, likewisecollectionsOfSize
should have a correspondingstringsOfSize
analogue.This requires a specialised form of
Trials<Character>
that possesses the magic methods.