Open t0yv0 opened 2 years ago
Could we not expose Either
to the user?
Instead of a foo(Either<String, Enum<T>>
we could generate a pair foo(String)
and foo(Enum<T>
.
https://github.com/pulumi/pulumi-jvm/issues/138#issuecomment-1096887776
If we decide to expose the Either
some changes to the API would probably be beneficial, but nothing comes to mind of the top of my head.
I'm thinking about renaming:
Either.ofLeft
-> Either.left
Either.ofRight
-> Either.right
We definitely will be unrolling Either from input builders, so the user does not need to generate it as input. We can continue using semi-internally for now for example new InputArgs().something()
getter may return Either but the user typically does not use getters on inputs. For outputs we'll need to see if it's even used in output positions, my understanding is it's rare.
In the N3+ case we now use Object in output positions. It may be ok for now.
In the N3+ case we now use Object in output positions
it is possible to nest: Either<A, Either<B, C>>
but this will get ugly fast ;)
Hello!
Issue details
Notes from Pawel (from #1):
Affected area/feature