Re: [go-nuts] Q: Why does Gob deserialize a ptr to an empty string back as null?

2021-12-01 Thread Rob Pike
Gob does not encode pointers as different from values. The stream is a stream of values. How many indirections it takes the values to come to the stream is not recorded. A consequence of that, combined with not sending zero values, is that empty strings and nil pointers to strings are encoded the s

[go-nuts] Q: Why does Gob deserialize a ptr to an empty string back as null?

2021-12-01 Thread 'Robert Whitcher' via golang-nuts
https://go.dev/play/p/bZtT0XdqmRg.go?download=true Seems like it is impossible to differentiate between not set and set to empty string which seem like different cases to me. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from t