3 ms·
> I am not sure why the Go team went down this route. Maybe it simplifies the compiler by having this bespoke assembly format? This was to allow for easy cross
by nzach 2y ago
> I am not sure why the Go team went down this route. Maybe it simplifies the compiler by having this bespoke assembly format?
This was to allow for easy cross-compilation.
You should probably clarify that you are talking about 'golang plan9 assembly format', and not about the plan9 OS. This confused me a lot. (https://en.wikipedia.org/wiki/Plan_9_from_Bell_Labs https://en.wikipedia.org/wiki/Plan_9_from_Bell_Labs)
I didn't know you could easily hand write 'golang assembly' for your functions. This seems really useful in some cases.
But I do wonder, why the std lib doesn't offer this ?
EDIT: I found the anwser: https://github.com/golang/go/issues/53171 https://github.com/golang/go/issues/53171
Here is a good explanation provided by Ian Lance Taylor:
> This proposal is focused on code generation rather than language, and the details of how it changes the language are difficult to understand. Go is intended to be a simple language that it is easy to understand. Introducing complex semantics for performance reasons is not a direction that the language is going to take.
- deleted 2y ago[deleted]