r/learnprogramming • u/MousseNo1453 • 5d ago
Topic [Homework] How is Go actually standardized if there's no ISO standard? (Conflicting answers)
Hola a todos,
Estoy trabajando en una tarea sobre la estandarización de lenguajes de programación. Dado que Go no está regulado por un organismo externo como ISO o ECMA, he estado investigando qué reglas sigue, pero encuentro respuestas contradictorias.
Algunas fuentes señalan la Especificación del Lenguaje Go como lo más parecido a un estándar formal. Otras enfatizan que no existe una base independiente y que el lenguaje está completamente dirigido por el Equipo Go de Google. Por otro lado, algunos argumentan que herramientas como gofmt y la Promesa de Compatibilidad de Go 1 son las que realmente normalizan el ecosistema.
Intento comprender el panorama general para mi tarea. ¿Podría alguien explicarme cómo encajan todas estas piezas?
¿Cuál es la respuesta definitiva? ¿Se considera la Especificación del Lenguaje el estándar oficial, o la estandarización en Go se logra únicamente a través de la gobernanza de Google y las herramientas de la comunidad?
No necesito un ensayo completo, solo una explicación clara de qué debo citar como el "estándar" para Go. ¡Gracias!
En resumen: Go no está estandarizado por la ISO. Si tuvieras que escribir un ensayo sobre cómo se estandariza Go actualmente, ¿qué documentos, entidades o herramientas citarías y por qué?
Thank you all so much for taking the time to answer this thread from a young university student who isn't very familiar with the topic. I truly appreciate it from the bottom of my heart. I'll leave this space open for anyone who wants to continue commenting or learn more about what's below. Without a doubt, I was able to answer my question. Thank you.
61
u/minneyar 5d ago
First, keep in mind that there's nothing magical about ISO. Anybody can call themselves a standards body. A lot of people respect ISO and use standards published through them, but nobody has to do that.
Go is owned and developed by Google, and as such, the Go language specification ( https://go.dev/ref/spec ), which is owned and maintained by Google, is the standard. I wouldn't even describe it as "the closest thing to a formal standard", it is a formal standard, just not one that is managed by ISO.
7
u/Warm-Republic-1913 5d ago
Go has no ISO-style standard, but it does have a normative document: the Go Language Specification is the closest thing, and the compiler and standard library are expected to follow it. Changes to the language go through the Go team's public proposal process, which is why people say the Go team directs it. The Go 1 compatibility promise adds that programs written for Go 1 should keep compiling and running with later Go 1.x releases, with a few documented exceptions. gofmt is different, since it standardizes code formatting rather than the language itself. For an assignment I would cite the specification as the standard, and describe the proposal process and the compatibility promise as how it is governed and kept stable.
13
u/edwbuck 5d ago
ISO is just one organization that ensures standards are up to a certain quality, and verified to be followed by those with their ceritification.
Golang is a product of Google, and they maintain a less rigorous internal standard, which is more accurately called, their current design choices and the parts of the implementation they find expensive to change. It's barely a standard, and as an example, they don't even address (in it) their handling of floating point numbers. You're just supposed to assume it's IEEE 754 floating point numbers, but if you find out it isn't, then they'll say something about how you over assumed what the standard didn't specify.
But that's just the tip of the iceberg. Go always favors current convention over reasonable requests. "true" and "false" should never have been permitted to be variable names, but the convention is to simply not do that.
Yes, it is, unfortunately, valid go.
4
u/Explorer651 5d ago
They fit together as different layers. The language specification defines the language, the Go 1 compatibility document is the Go team's promise that Go 1 programs keep compiling, and gofmt only standardizes formatting. Go 1 also ships two compiler suites, gc and gccgo, as implementations of that spec.
4
u/motific 5d ago
I wouldn't claim it is standardised because it is (as you say) "standardization in Go [is] achieved purely through Google's governance and community tools".
Google has a habit of decreeing something is a standard, and people accept it, or in other cases they'll just stuff the standards body with their own people and shout down any alternative opinions.
3
u/michael0x2a 5d ago edited 5d ago
I agree with the other top-level comments posted so far in this thread. If you want a simple + concise answer, I think you already have it.
I'm posting this mostly because I wanted to expand a little on the underlying mechanics of programming language development and the "bigger picture".
Something worth noting is that the majority of programming languages today are actually not standardized, in the sense that there is most languages do not have external body like ISO/ECMA responsible for maintaining an implementation-independent standard or specification.
This is because there is actually minimal value to establishing this independent body for most programming languages. Most programming languages have only one single implementation (or one "primary" implementation). This in turn means it's simpler to just keep everything "in-house": have the people who own making changes to the underlying interpreter or compiler also be responsible for maintaining a spec and reviewing proposed changes to it. For example, Go has their Golang proposal process, Python has PEPs, Java has JEPs, and so forth.
For these languages, creating an independent body would have minimal value: all it would accomplish is introduce an unnecessary logistical/bureaucratic hurdle to making language changes.
(This organizational structure also explains why many languages do not have a formal specification, only an informal one. It is of course useful to maintain some sort of specification -- but if there is only one primary implementation, it is easy to leave some behavior unspecified and up to the implementation. This happens sometimes by accident and sometimes by design to help keep the overall spec simpler.)
Creating an independent body mostly only starts becoming useful when there are multiple independent implementations. This explains why languages like C and C++: in the past, each operating system vendor used to maintain their own C/C++ compiler. Today, most development has concentrated around GCC, LLVM/Clang, and MSVC -- but 3 separate compilers is still plenty of reason to maintain a separate body. Similar thing with JavaScript: each major web browser implementer maintains their own JavaScript engine, so it's useful to have an independent coordinating body.
Or to rephrase -- creating a formal standard and an independent body can be a useful tool both for communication and for helping manage the politics around a joint open-source project. But it isn't an intrinsically desirable end-goal in and of itself.
(Note: I am using the word "politics" neutrally here -- as in, "the art and science of government")
I would say this is mixing two different levels of concerns.
The answer to the former is a combination of the Go language reference. I would say this is an example of an informal spec -- it tries to be as formal and precise as it can. But it (understandably) does not define the exact semantics with mathematical precision, and so ultimately leaves some semantics up to current behavior of the Go compiler and runtime itself.
The answer to the latter is Google. They are the body that maintains ultimate control over the Golang language and how it evolves.
The open-source community does admittedly also have a fair amount of influence over the direction of Golang, both at the micro level via filing issues and pull requests or at the macro level via the official language change proposal process. But Google is the ultimate gatekeeper.
The community can and also have been overridden by Google before -- one prominent example of this was back around ~2018 when the Golang community spent a fair amount of time brainstorming/designing a module system for Golang (
dep) only for it to be rejected in favor of an alternate design (vgo) by Russ Cox, the tech lead for Golang.IMO this was probably the correct decision from a purely technical standpoint, but I do recall it caused some bruised feelings at the time.
For completeness, it's worth noting that there's actually a 3rd level of concern here -- who owns the legal and financial aspects of a programming language? E.g. the money to run the language's website, package manager, and associated infra, who maintains legal control over trademarks such as the programming language's name and logo, who hires and pays people to work on the language itself, etc...
For golang, the answer is still "Google". But in other languages (especially open-source ones), there often ends up being a split structure where one body owns the language design/evolution and the other the legal/financial aspects. But we're probably veering pretty far from your homework question at this point.
IMO these are both largely unrelated to the questions of standardization and governance.
I guess gofmt is a useful tool for helping projects that use Golang maintain a similar standardized style, but that is a completely separate thing from the standardization/specification of the programming language itself. We're using the word "standardized" in two different ways here.
The Go 1 compatibility promise is best viewed as a general guiding philosophy espoused by the Go language team (aka Google) and used to judge language change proposals. But a philosophy is not the same thing as a technical standard or a governance structure.
3
u/Vizeroth1 5d ago
The very notion of standardization is that control of the language (or whatever you’re standardizing) is turned over to a standards body. From your statements, it appears that this has not been done for Go, so the answer is that there is no standard, there is only whatever Google decides Go is. This isn’t particularly unusual in the history of programming languages.
The specification/implementation from the original developer of the language is often called the de facto standard because no formal standard exists. Another example of this would be Java. The lack of a standard in that case lead to lawsuits between Sun and Microsoft over the Java trademark (which lead to a settlement and Microsoft no longer shipping a Java runtime in their products) and between Google and Oracle over the use of the Java language and APIs in Android, which went to the Supreme Court, ruling in Google’s favor.
1
u/lurgi 5d ago
Like Rust and Python, there is a reference implementation.