Joe Tsai

Results 341 comments of Joe Tsai

This seems like a compiler optimization issue: * It's unfortunate that `As16` is not inlineable. See golang/go#42958. * If it were inlineable, the compiler should realize that storing a word...

Given that `MarshalText` and `MarshalBinary` are fairly standardized methods, perhaps the `sql` package should be extended to understand them?

I don't think it's reasonable for the types for every package to implement magic methods for the interfaces from most other packages that exist. That would lead to untenable code...

This is moot. The `deephash` package uses `unsafe` to break past any concept of addressability in "reflect".

Thank you @ahrens and @delphix for even considering open-sourcing this. As someone who's involved in many open source projects, I know how much work it is to maintain these projects....

> So is the main reason for this so that you can add new methods to the interface without breaking users? Essentially this. The protobuf language has new additions over...

\cc @cybrcodr, do you happen to remember what the behavior for equivalent functionality in C++ is?

I didn't check C++, but I'm going to guess that it doesn't handle this case since there's not an obvious behavior to perform in the case of repeated fields.

> "ignores" unknown string value by dropping it and hence changing the size of the repeated field. Wow. That is surprising behavior, but okay.

@cybrcodr [mailed out a change for this already](https://go-review.googlesource.com/c/protobuf/+/256677). I agree that something should be changed, but it's not clear what should be changed. It's known that C++'s approach is problematic,...