[go-nuts] on the portability of make.bash

2024-04-11 Thread Eric Grosse
In 2012 Russ wisely and definitively addressed portability of make.bash: We are aware of the history of incompatibilities between shells. For a while we did try to write portable shell scripts, but that was distracting us from the real work of writing Go [https://github.com/golang/go/issues/3

[go-nuts] Re: Is json.Marshal deterministic?

2024-04-11 Thread 'TheDiveO' via golang-nuts
They are distinct indeed. An "if sl == nil ..." will not match an empty slice. It is len(sl) that returns 0 for both nil and empty slices, and range working along the same idea. playground example: https://goplay.tools/snippet/df0bG6YXfJZ https://goplay.tools/snippet/df0bG6YXf https://goplay.to

[go-nuts] Re: Is json.Marshal deterministic?

2024-04-11 Thread Juliusz Chroboczek
> I don't know if JSON serialization is deterministic, but I know a couple > of cases when it is not. > If the type or some type inside it has a custom JSON marshaller (method > MarshalJSON), then if that function's output is not deterministic, the > whole JSON for the type is not deterministic.