3 ms·
I'm not a Go fan, but I'm not ready to dismiss it as "trash" -- I mean, it works! And plenty of people like it. But I can't quite figure out whether this Go as
by iainmerrick 9y ago
I'm not a Go fan, but I'm not ready to dismiss it as "trash" -- I mean, it works! And plenty of people like it.
But I can't quite figure out whether this Go assembly stuff is a real feature that makes sense and is well-designed, or if it's just a quirk of the implementation, stemming from its background in Plan 9.
The assembly section in the Go docs literally says "go read the Plan 9 docs first". That's kind of weird.
- iainmerrick 9y agoOK, another commenter linked to crc32 in the Go standard library: https://github.com/golang/go/tree/master/src/hash/crc32 https://github.com/golang/go/tree/master/src/hash/crc32 That has different .s files for different architectures, and a .go file with the platform-independent version, so the assembly clearly isn't platform-independent. It seems a strange decision to disguise e.g. arm64 assembly behind an x86-like syntax, so I'm going to go with "quirk of the implementation."
- weberc2 9y agoAs I understand it, Go's assembly is an artifact of its heritage--it was initially built by developers who were more familiar with the Plan 9 toolchain than they were with other toolchains.
- baby 9y agoI believe the people behind Go are the people behind Plan 9?