---
title: "Parentheses or square brackets for generics?"
publication: "Go Weekly"
issue: 321
published_at: "2020-07-17"
canonical_url: "https://golangweekly.com/issues/321"
---

Plus more Go news and links.       

#321 — July 17, 2020 

[Unsubscribe](https://golangweekly.com/leave/*|UID|*)|[Read on the Web](https://golangweekly.com/issues/321)   

Golang Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/wwxrfaf90js3e794t915.jpg)](https://groups.google.com/u/1/g/golang-nuts/c/7t-Q2vt60J8)  

[Generics and Parentheses](https://groups.google.com/u/1/g/golang-nuts/c/7t-Q2vt60J8) — Using parentheses `()` to declare or instantiate types raised numerous concerns but the core team is now experimenting with square brackets `[]` instead – can you find any issues with this? For example, what might have previously been `func f((T(int))` could instead be `func f(T[int])` which, frankly, reads a lot better to us.

_(Note: Annoyingly, a Google login is required to read Groups posts. If you don’t want to do this, [here’s a screenshot of the post](https://imgur.com/a/2euh2xY) you can read instead with the text in the description.)_ 

Robert Griesemer   [![\](https://copm.s3.amazonaws.com/87e97607.png)](https://www.ardanlabs.com/corporate-training/?utm_source=Cooperpress%20PrimaryV3) 

[Remote Instructor-Lead Go, Docker, Kubernetes, & Python Training](https://www.ardanlabs.com/corporate-training/?utm_source=Cooperpress%20PrimaryV3) — We offer live-streaming remote training sessions for individual engineers and companies that want to augment their knowledge in Go, Docker, Kubernetes, and Python. We’ve trained over 5,000 engineers via our carefully crafted classes. 

Ardan Labs sponsor   

[Making Pong with Go and WebAssembly](https://dstoiko.github.io/posts/go-pong-wasm/) — Another fantastic example of using Go to build something that works in the _browser_ by way of WebAssembly. 

David Stoikovitch   

[Go 1.14.6 and Go 1.13.14 Released](https://forum.golangbridge.org/t/go-1-14-6-and-go-1-13-14-are-released/19795) — 1.14.5 and 1.13.13 also came out a few days ago which covered two security fixes: data race in `net/http` and a X.509 verification issue on Windows. These two extra releases are more focused on minor fixes. [More info here.](https://golang.org/doc/devel/release.html#go1.14.minor) 

Go Forum     

**⚡️ Quick bytes:** 

- We've not had time to go through them yet but [21 talks from GopherCon Europe 2020](https://www.youtube.com/playlist?list=PLtoVuM73AmsKnUvoFizEmvWo0BbegkSIG) are now up to watch on YouTube.
- The Go core team are considering [a change](https://groups.google.com/g/golang-nuts/c/Gl6bODRX1NE/m/OqAouOKPBQAJ) that would make Go's minimum requirement on x86 to be.. the Pentium 4 😁 Luckily `gccgo` would continue to support 387 floating point if you _really_ need it.
- GoLand 2020.2 is now in beta and here's [everything that's new.](https://blog.jetbrains.com/2020/07/16/goland-2020-2-reaches-beta/)
- [Hugo 0.74.0](https://gohugo.io/news/0.74.0-relnotes/) is a significant release of the popular Go-based static site builder with huge JavaScript improvements including native and 'very fast' JavaScript bundling.   

💻 Jobs  

[Sr. Software Engineer at CrowdStrike (Remote)](https://crowdstrike.wd5.myworkdayjobs.com/crowdstrikecareers/job/USA-Remote/Sr-Software-Engineer_R3806) — CrowdStrike is the leader in cloud-delivered endpoint protection, which helps protect our customers from cybersecurity attacks. 

CrowdStrike   

[Golang Developer at X-Team (Remote)](https://x-team.com/remote-go-developer-jobs/?utm_source=cooperpress&utm_medium=email-ad&utm_campaign=go) — Join the most energizing community for developers and work on projects for Riot Games, FOX, Sony, Coinbase, and more. 

X-Team   

[Find a Job Through Vettery](https://www.vettery.com/tech?utm_source=newsletter&utm_medium=cooper-golangweekly&utm_term=tech&utm_content=grouped&utm_campaign=ad-77582) — Use Vettery to connect with growing tech teams at startups and Fortune 500 companies. 

Vettery  

📚 Articles & Tutorials  

[How Are Deadlocks Triggered?](https://t.co/b2ydKldKdO?amp=1) — Go has a deadlock detector, but how does it work? And what are its limitations? 

Vincent Blanchon   

[Unit Test Outbound HTTP Requests](https://erikwinter.nl/notes/2020/unit_test_outbound_http_requests_in_golang/) — Go makes it very easy to mock services, but Erik goes one step further and records external service responses so you can run your tests dependency-free. 

Erik Winter   

["Interface Smuggling", a Go Design Pattern for Expanding APIs](https://utcc.utoronto.ca/~cks/space/blog/programming/GoInterfaceSmuggling) — In short, check to see if a type supports a broader API and use it. 

Chris Siebenmann   

[The Golang Security Checklist](https://link.sqreen.com/iwsY6ZRt) 

Sqreen sponsor   

[PopCount on ARM64 in Go Assembler](https://barakmich.dev/posts/popcnt-arm64-go-asm/) — A useful CPU extension, a really interesting architecture, and Go’s offbeat assembler 

Barak Michener   

[Under The Hood of `context`](https://vishnubharathi.codes/blog/go-contexts/) — A guided tour through `context`’s source with the intention being to reduce the author’s worries about when and why to use it. 

Vishnu Bharathi   

[Use Cases for Channels](https://go101.org/article/channel-use-cases.html) — This isn’t new but you might find it useful nonetheless and it’s delightfully code and example heavy. 

Go101   

▶[Your First Week with Go](https://changelog.com/gotime/138) — Two developers (Jacquie Grindrod and DaShaun Carter) join Jon Calhoun to talk about their first week with Go, what worked for them and what didn’t. 

Go Time Podcast podcast  

🛠 Code & Tools  

[Afero: A Filesystem Abstraction System for Go](https://github.com/spf13/afero) — A single consistent API for accessing a variety of filesystems. Also lets you create mock and testing filesystems that don’t rely on disk at all. 

Steve Francia   

[errcheck: Checking That You Checked for Errors 🐞](https://github.com/kisielk/errcheck) — Checking for errors is a fundamental part of the Go experience and this tool will help you check that you checked! 

Kamil Kisiel   

[CockroachDB + GoLang](http://cockroachlabs.com/db/go/?utm_campaign=cooperpress-2020-Q3&utm_source=go-newsletter&utm_medium=newsletter&utm_content=go-weekly-crdb-golang) — CockroachDB is a highly available distributed SQL db written in Go. Start building your Go app with CockroachDB for free. 

Cockroach Labs sponsor   

[go-ordered-map: An Implementation of Ordered Maps](https://github.com/wk8/go-ordered-map) — Think of a map that remembers the order key-value pairs were added, so you can iterate over `map.Newest()`. 

Jean Rougé   

[gRPCurl: Like curl, But for gRPC](https://github.com/fullstorydev/grpcurl) — A command line tool for interacting with gRPC servers. 

Engineering at FullStory   

[oapi-codegen: Generate Go Client and Server Boilerplate From OpenAPI 3 Specifications](https://github.com/deepmap/oapi-codegen) 

DeepMap, Inc   

[gorush: A Push Notification Server Written in Go](https://github.com/appleboy/gorush) — Supports APNS (Apple Push Notification Service) and Firebase. Now supports concurrent pushes for iOS. 

Bo-Yi Wu   

[Testify: Assertions and Mocks That Play Nicely with `testing`](https://github.com/stretchr/testify) 

Stretchr, Inc.   

[go-tagexpr: An Interesting Way to Add Tag Expressions to Structs](https://github.com/bytedance/go-tagexpr) — The main use case so far is to define validations. 

Bytedance Inc.         

Curated by [Glenn Goodrich](https://twitter.com/ruprict) and [Peter Cooper](https://twitter.com/peterc). 

[Change your email address](https://golangweekly.com/edit_subscription/*|UID|*) or[Stop getting this newsletter](https://golangweekly.com/leave/*|UID|*) 

© Cooper Press Ltd · Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom
