On Wed, Jun 23, 2021 at 7:06 AM Vaibhav Maurya <
vaibha...@gmail.com> wrote:
> I appreciate the whole discussion, it was really insightful. Since Golang is not my first language, I had a preconceived notion about key-value pair initialization.
> Here I would like to disagree with the syntax, it would be good that with the innovation in the language, the general idea of an Array and slice should be maintained, instead of making certain syntaxes so weird.
The composite literal syntax is in essence the same as what modern C
has for decades. Not sure what's weird about it.
Can you elaborate on "it would be good that with the innovation in the
language, the general idea of an Array and slice should be maintained"
or provide some examples of what you are thinking about?
> This syntax is really unintuitive for me. the key-value pair structures give so many pictures like hashing, scattered memory allocations, etc.
It's obviously subjective, but I wonder, how would the syntax, that
you would call intuitive, look like.
It may happen that you have some nice idea that's worth turning into a
proposal for improvement.