You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inspired by some of the issues @cb372 raised about Proto3 and their "everything is optional" policy, I have been thinking of a new design to accomodate this scenario, but also others like GraphQL in which sometimes you want to use a data type only to indicate that you want to query some field.
Essentially the idea is to move from the usual first-order data:
Now we can indicate that every field is optional by using Person Maybe, or required by setting Person Id. As I said before, it also opens possibilities to describe things like "I want this field":
Inspired by some of the issues @cb372 raised about Proto3 and their "everything is optional" policy, I have been thinking of a new design to accomodate this scenario, but also others like GraphQL in which sometimes you want to use a data type only to indicate that you want to query some field.
Essentially the idea is to move from the usual first-order data:
to a higher-kinded version in which every field is wrapped in a type constructor:
Now we can indicate that every field is optional by using
Person Maybe
, or required by settingPerson Id
. As I said before, it also opens possibilities to describe things like "I want this field":Of course, I am more than happy to execute the plan.
The text was updated successfully, but these errors were encountered: