thana
05/31/2019, 2:08 PMnull
is not supported with protobuf. that is a HUGE drawbacksandwwraith
05/31/2019, 2:12 PMthana
05/31/2019, 2:17 PMthana
05/31/2019, 2:20 PMsandwwraith
05/31/2019, 2:23 PMval x: Int? = 42
if x
is missing? Even non-nullable val x: Int = 42
can cause problems because protobuf specs clearly says that "absence of value should be treated as 0 for primitives and - huh - 'field is not set. Its exact value is language-dependent' for non-primitive types".sandwwraith
05/31/2019, 2:23 PMnull
as 'not set', but we can't afford such luxury in Kotlinthana
05/31/2019, 2:28 PMthana
05/31/2019, 2:29 PMx
is missing it was explicitly set to null
in the second case the serialized form would simply missmatchthana
05/31/2019, 2:34 PM