There is the maybe in Compat, but I'd rather have it more explicitly called out in the places I need it.
Also perhaps some kind of hybrid optional thing that disregards null as well as missing fields. The exact behaviour of that would need thinking about some, since when it comes to encoding Nothing there is a choice to be made - omit the field or specify null? It kinda suffers from the same ambiguity as nested Compat nulls. Maybe it's better just to have to deal with it manually, on a case by case basis by having to stack the optional and nullable and then use dimap to join / pure. 🤔
There is the
maybeinCompat, but I'd rather have it more explicitly called out in the places I need it.Also perhaps some kind of hybrid optional thing that disregards
nullas well as missing fields. The exact behaviour of that would need thinking about some, since when it comes to encodingNothingthere is a choice to be made - omit the field or specifynull? It kinda suffers from the same ambiguity as nestedCompatnulls. Maybe it's better just to have to deal with it manually, on a case by case basis by having to stack theoptionalandnullableand then use dimap tojoin/pure. 🤔