
I am done with Golang
The PrimeTime
Overview
This video discusses the speaker's evolving and ultimately negative perspective on the Go programming language. Initially a strong advocate for Go's simplicity and efficiency, the speaker details how recent language additions, particularly generics and iterators, have undermined Go's core principles. The speaker argues these changes move Go away from its unique identity, making it more like other complex languages without offering their full benefits, and introduces a new era of code complexity and inconsistency. The speaker concludes by introducing Odin as a potential spiritual successor that retains Go's original appeal.
Save this permanently with flashcards, quizzes, and AI chat
Chapters
- Go was initially loved for its simplicity, speed, and ease of use, especially for command-line and system-level tools.
- The language's mantra of 'one way to do things' fostered consistency across codebases, making projects feel familiar.
- The speaker's early experience with Go, including a humorous anecdote about misunderstanding multiple return values in JavaScript, highlights a deep initial immersion.
- Go's focus on solving the core problem, rather than complex language features, was a significant appeal.
- Go 1.18 introduced generics, initially only for functions, but later extended to method receivers in Go 1.27.
- Generics allow for more abstract and reusable code, exemplified by a generic 'Result' type that can hold a value or an error.
- However, the speaker argues that Go's implementation of generics is not as powerful as in other languages (e.g., inability to create a truly generic convert function for variable arguments).
- This addition, along with iterators, introduces new layers of abstraction and potential for inconsistency, moving away from Go's 'one way' philosophy.
- The speaker criticizes the addition of features like generics and iterators, arguing they make Go codebases less predictable and harder to understand.
- Historically, Go's explicit error handling, while verbose, ensured developers were aware of potential failures.
- New features like iterators can hide underlying operations, reducing transparency and predictability.
- The speaker feels Go is losing its identity by trying to emulate features from languages like Rust and TypeScript, offering a 'Rust-lite' or 'TypeScript-lite' experience without their full advantages.
- The speaker has found a new language, Odin, which they feel captures the spirit of what Go once was.
- Odin offers features like directory-level packages (preferred over file-level modules), explicit overloading, and fine-grained control over memory allocation.
- Odin is described as a simple, C-like language geared towards games and graphics, with a clear, defined purpose.
- Unlike the current direction of Go, Odin 'knows what it wants to be,' providing a focused and straightforward development experience.
Key takeaways
- Go's initial appeal stemmed from its deliberate simplicity, consistency, and focus on developer productivity by minimizing language complexity.
- The introduction of generics and other advanced features, while potentially powerful, can dilute a language's core identity and introduce unwanted complexity.
- A language's success can be tied to its clear purpose and adherence to its foundational principles, rather than adopting features from other paradigms.
- Explicit error handling, though verbose, can foster a more robust and transparent development process by forcing developers to acknowledge potential failures.
- The evolution of a programming language can lead to a divergence from its original user base if its core philosophy is perceived to be compromised.
- New languages like Odin aim to recapture the essence of older, simpler design philosophies, offering an alternative for developers seeking those qualities.
Key terms
Test your understanding
- How did Go's original design philosophy of 'one way to do things' contribute to its appeal, and how might recent additions like generics challenge this?
- What are the potential downsides of adding complex features like generics to a language that was initially designed for simplicity, according to the speaker?
- Explain the speaker's critique of Go's generic implementation compared to other languages.
- Why does the speaker feel that Go's explicit error handling, despite its verbosity, was a positive attribute?
- In what ways does the speaker believe Odin serves as a spiritual successor to the original Go language?