VOOZH about

URL: https://thenewstack.io/this-week-in-programming-go-approves-generics-long-at-last/

⇱ This Week in Programming: Go Approves Generics, at Long Last - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2021-02-13 06:00:11
This Week in Programming: Go Approves Generics, at Long Last
this-week-in-programming,
DevOps / Software Development

This Week in Programming: Go Approves Generics, at Long Last

This Week in Programming assembles all the hottest development news for the cloud native computing community.
Feb 13th, 2021 6:00am by Mike Melanson
👁 Featued image for: This Week in Programming: Go Approves Generics, at Long Last

Rejoice, long at last, all you Gophers, for the question of whether or not the Go programming language will adopt generics has finally, after many years of debate, been answered this week with the acceptance of a proposal made last month.

In this most recent proposal, Golang team member Ian Lance Taylor writes that generics have been “one of the most commonly requested language features” since the language was first released in 2009, but even then, it’s adoption doesn’t come without concerns. Taylor explains the idea of generics in the intro of his proposal:

“Generics can give us powerful building blocks that let us share code and build programs more easily. Generic programming means writing functions and data structures where some types are left to be specified later. For example, you can write a function that operates on a slice of some arbitrary data type, where the actual data type is only specified when the function is called. Or, you can define a data structure that stores values of any type, where the actual type to be stored is specified when you create an instance of the data structure.”

It is precisely this value proposition — being able to write reusable code — that excites some developers and has been behind the push all along.

Adding generics to Golang fixes one of the major things that annoys me about the language! I’ve written a bunch of Go code, and the amount of duplicate / boilerplate code this will eliminate will make it more enjoyable to use.

— Rob (@robdaemon) February 10, 2021

While we don’t need to relitigate the various arguments against adopting generics, now that a proposal has finally made it through the proposal process, a new concern has found its voice among several users: that when presented with a hammer, everything looks like a nail.

This aptly summarizes how I feel about Go generics, as we prepare to be reamed by oodles of “just because you can doesn’t mean you should” generic code.

In baking a code pie, generics should be the salt, not the sugar, but I have concerns about those getting mixed up.🧂💥😵 https://t.co/cQv3YQeqAM

— ian molee (@ianfoo) February 11, 2021

This wouldn’t be the first time, however, that a new language feature was confronted with this fear. When channels were introduced to the language, they too became the feature that, for a time, turned everything into a nail. As time went on, this concern faded, and the hope now is that the same will come to pass with the adoption of generics.

Yeah I brought this concern up with the Go maintainers during the review period and their response (which I agree with) was: you can write really bad code with channels, but the community has done a good job figuring that out. Generics hopefully will be the same.

— Mitchell Hashimoto (@mitchellh) February 11, 2021

Only time will tell, and for now, there is still some time left before all you Gophers will be able to get your paws on the long-awaited feature. At least according to the original proposal, the goal “will be to have a complete, though perhaps not fully optimized, implementation for people to try by the end of the year, perhaps as part of the Go 1.18 betas.”

Now, before moving on to the rest of the world of what’s happening in programming this past week, here’s a video looking at the potential paradigm shifts coming to programming, what with the advent of cloud native everything, in the years ahead.

This Week in Programming

  • Is Pattern Matching a Step too Far for Python? Generics wasn’t the only controversial programming language addition this week, with the Python Steering Council making the decision to accept a number of Python Enhancement Proposals (PEPs) collectively known as the Pattern Matching PEPs. “We acknowledge that Pattern Matching is an extensive change to Python and that reaching consensus across the entire community is close to impossible,” the council writes, saying that, nonetheless, they “are confident that Pattern Matching as specified in PEP 634, et al, will be a great addition to the Python language.” One dissenter to the addition found their way to the pages of iProgrammer, with the snarky headline “Python Adopts Pattern Matching — Kitchen Sink Next.” While they “don’t think that pattern matching is a bad thing to add to Python,” they see its addition as part of a greater narrative of feature bloat. “It seems to be a non-essential with only minor advantages,” they write. “It does fit in with the life-cycle of a language, however: first its small, compact and lovable; then it adds the parts that a lot of programmers have been missing; then it adds the rest, including the kitchen sink, and settles to a bloated old age waiting for a new compact and simple language to replace it.”

Before kubernetes: I had lots of fires.
After kubernetes: I had horizontally autoscaling fires

— fraq (@0xfraq) February 9, 2021

  • Google Ups Its Python Support: In other Python news, Google has offered an update around its support for the Python ecosystem, noting that the language is “critically important” to both Google Cloud and its customers, serving as a runtime for Google App Engine and Cloud Functions, among other internal uses. Presently, the company says it will increase its support for the Python Software Foundation with “a donation of more than $350,000 to support three specific PSF projects, with a focus on improving the supply-chain security of the Python ecosystem,” which include productionized malware detection for the Python Package Index, improvements for foundational Python tools and services, and a CPython Developer-in-Residence for 2021, who will work full time to help the CPython project prioritize maintenance and address its backlog. Google also says it will continue its in-kind donation of Google Cloud infrastructure to the foundation, and make the Google Cloud Public Datasets program the new home of a new public dataset of PyPI download statistics and PyPI project metadata.

British Python devs be like “that’s a constructor, __init__?”.

— Jesslyn 🇮🇩 (@jtannady) February 10, 2021

  • The Rust Foundation Is Born: In some other big programming language news this week, the Rust Foundation officially launched earlier this week, with Amazon Web Services, Huawei, Google, Microsoft, and Mozilla committing to two years of “a more than million dollar yearly budget to develop services, programs, and events that will support the Rust project maintainers in building the best possible Rust.” As we’ve previously detailed, the Rust team found itself a bit upended last year when Mozilla, the company originally behind the open source language, laid off 250 employees, many of them Rust contributors. Now, six months later, the foundation is a reality and the future of Rust appears to be ensured. As previously explained in a FAQ about the foundation, the Rust Foundation will center its efforts more around handling legal issues, outreach, hosting infrastructure, and generally supporting the community than directing the future of the language itself. To that end, Mozilla has already handed off all trademark and infrastructure assets, including the crates.io package registry to the foundation, and a new board has formed with five board directors from the five founding member companies and five directors from Rust project leadership.
  • Google Opens up Its 2021 Season of Docs: Finally, if you happen to be part of an open source software project and in need of help writing documentation, Google has announced that it is now accepting applications for organizations for its Season of Docs 2021, a program created to do just that. Last year, the project had 64 successful standard-length technical writing projects, with 44 documentation projects the year before. This year’s efforts “will continue to support better documentation in open source and provide opportunities for skilled technical writers to gain open source experience” and applications for organizations are open now until March 26, at 18:00 UTC. For technical writers interested in getting involved, there is a guide available and any questions regarding the program can be sent to season-of-docs@google.com.

I’m glad Go is finally getting generics because my insurance wouldn’t cover brand-name Go. https://t.co/0NKnI9naJF

— Aaron Patterson (@tenderlove) February 10, 2021

TRENDING STORIES
Mike is a freelance writer, editor, and all-around techie wordsmith. Mike has written for publications such as ReadWriteWeb, Venturebeat, and ProgrammableWeb. His first computer was a "portable" suitcase Compaq and he remembers 1200 baud quite clearly.
Read more from Mike Melanson
SHARE THIS STORY
TRENDING STORIES
Amazon Web Services is a sponsor of The New Stack. 
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.