4 ms·
A couple of things to add to this: the language spec is like a page long and very readable. Also the entire compiler toolchain and everything is written in Go a
by innagadadavida 4y ago
A couple of things to add to this: the language spec is like a page long and very readable. Also the entire compiler toolchain and everything is written in Go and doesn’t depend llvm etc. This doesn’t help the developer but is a pretty unique aspect of Go.
- randomdata 4y ago> Also the entire compiler toolchain and everything is written in Go and doesn’t depend llvm etc. Depends on which implementation you're talking about. One of the stated goals of the Go project is that there must not be just one implementation. gc does not, but tinygo depends on llvm. gccgo depends on gcc.
- josephcsible 4y agoIf a language spec is only a page long, it's leaving a bunch of important things unspecified.
- metadat 4y agoCan you clarify further? Otherwise this seems like a shallow dismissal, which is against our HN community guidelines, and makes for uninteresting discussion.
- alice-i-cecile 4y agoProgramming languages have a large amount of irreducible complexity. A page long spec for a language more complex than Brainfuck cannot represent the critical distinctions correctly. Without that clarity, you end up with incompatible, spec-compliant implementations. This is a disaster, and so below a certain point relative to language complexity a shorter spec is simply wrong.
- metadat 4y agoAre there nasty divergences between official go and cgo?
- josephcsible 4y agoAs it turns out, Go's spec is 105 pages long, not just one as was claimed upthread: https://go.dev/ref/spec https://go.dev/ref/spec So the answer to your question is "not that I know of", but that's not evidence that a one-page spec is workable after all.
- randomdata 4y ago> Without that clarity, you end up with incompatible, spec-compliant implementations. The Go team officially maintains two implementations, gc and gccgo, to ensure that implementation doesn't end up ruling over the specification as has happened in other languages. There are also other third party implementations, including tinygo. Which spec-induced incompatibilities across these implementations are you referring to?
- oxnrtr 4y agoGo doesn't have a one-page spec, so what do you expect the GP to point to? You are proving his point.
- randomdata 4y agoLooks like one page to me: https://go.dev/ref/spec https://go.dev/ref/spec
- oxnrtr 4y agoYeah, no.
- randomdata 4y agoFeel free to show us the second page.
- josephcsible 4y agoIt starts about 2/3 of the way through the table of contents.
- randomdata 4y agoA link is fine.
- atombender 4y agoThe language spec (https://go.dev/ref/spec https://go.dev/ref/spec) is about 96 pages when printed on A4 paper. Certainly not a page long.