A Nil by any other name

Shay Nehmad:

This show is supported by you. Stick around till the ad break to hear more about that. This is Cup o' Go for 04/17/2026. Keep up to date with the important happenings in the Go community in about twenty minutes per week. I'm Shay Nehmad.

Jonathan Hall:

I'm Jonathan Hall. Shay, why are you here? I thought you were gone.

Shay Nehmad:

Yeah. I was supposed to be gone and then, you know, the some people decided that the price of gas is too low, so now I'm I'm still here. Thank you very much for the our, replacement cohost that came and covered for me in the two weeks that I was supposed to be on vacation during spring break. I actually did not, take a vacation, but y'all were so excited to come on the show and talk with Jonathan that we decided to just keep it online. But, yeah, I'm hoping to do my vacation next month.

Shay Nehmad:

Hopefully, things will calm down in that region.

Jonathan Hall:

Alright. Yeah.

Shay Nehmad:

How did you enjoy doing the episodes without me? It was a breath of

Jonathan Hall:

fresh air, man. No. I missed you.

Shay Nehmad:

I'll go I'll go talk to my dentist. I understand. If it carries if it carries my my, me not brushing my teeth carries all the way through podcast, though, we're in a problem. Alright. I enjoyed listening to the episodes, while I was gone, but we have quite a lot of proposals to, get through.

Jonathan Hall:

Yes.

Shay Nehmad:

I would like to kick things off with a conference because these are all this is always like timely news. Mhmm. And gophercon dot s g. And before I I tell you what that is, I wanted to ask, do you ever play Geogesser or Geogesser,

Jonathan Hall:

I guess? No. I think I know what it is, but no.

Shay Nehmad:

It's like that game where the

Jonathan Hall:

I see a picture

Shay Nehmad:

of something drops you in the middle of of Google Maps.

Jonathan Hall:

Oh, okay.

Shay Nehmad:

And then you have to guess, like, where you are on the on the world map.

Jonathan Hall:

Yeah. No. I never

Shay Nehmad:

played You can, like, walk around. So if you are if you are going to play it, which I highly recommend, a great cheat is knowing all the domain names because you'll, like, see vans or or, you know, signs, billboards across the highways or whatever with websites. And if you can't figure out which country you're in, if you know the domain, you can at least clock the country.

Jonathan Hall:

Got it.

Shay Nehmad:

All that to say that goforcon.sg is actually Singapore. Twenty to the twenty second of May twenty twenty six, there's gonna be GopherCon Singapore with honestly one of the most it's probably like relevant to the country. I don't know if it's like a huge fish gopher thing with lots of gophers on it. Love the design. Absolutely love it.

Shay Nehmad:

Among the speakers, Bill Kennedy, Dave Cheney, Florin from Ardan Labs, Rona Steinberg, Ron Evans, Ethan Lee from the Go team, Alex Rios, and others. So, you know, a pretty beefy lineup.

Jonathan Hall:

Yeah. I see Arseny from Jet Brain is gonna be there. He was at Go West also. It was I got to to meet him.

Shay Nehmad:

There's also it's also cool to see all the all the names and, like, recognize, oh, this person was in Cup o' Go. This person was in a cup o' Go. This person, I wanna be bring him on a cup o' Go. Yeah. And, generally, there are paid tickets.

Shay Nehmad:

This is like a conference conference, but I don't know that currency, Singapore dollar. I have no

Jonathan Hall:

How does that translate? Yeah.

Shay Nehmad:

I have no idea what the translation rate is, but no matter how much it is, it's probably worth it, to be honest. And they I do like it that normally, like, I don't know if this ever happened to you, but if you work at a company, they'll be like, oh, we'll pay your ticket. Right?

Jonathan Hall:

Mhmm.

Shay Nehmad:

Like, as education budget. Sometimes you're a freelancer or even you you're, like, looking for work and these events are, like, the way for you to do some networking. So the Gopher car Gopher Con Singapore is offering a discount code, paying my own way, which just, is available. It's like, if you're paying for yourself, use the discount code paying my own way for 10% off, which is nice. And the cheap, conference ticket is, available until May 4.

Shay Nehmad:

So Star Wars Day is like your cutoff. Have you ever been to Singapore?

Jonathan Hall:

No. I've barely even been to Asia at all.

Shay Nehmad:

Even though you're pretty well traveled compared.

Jonathan Hall:

We had plans to go to Asia, and then we had babies instead. So

Shay Nehmad:

Yeah. Maybe later. Put it put it in the backlog like the rest of our news.

Jonathan Hall:

That's right. I'll put that here at the bottom of card number 79.

Shay Nehmad:

Alright. So Go For Kan Singapore. And we did have someone I can't pull it up. Can you pull up who we had on the channel that's gonna be there? Andy.

Shay Nehmad:

Andy. Andy Williams from

Jonathan Hall:

the show

Shay Nehmad:

is gonna be there. Yeah. Although, honestly, you don't have to fly all the way to Singapore to find them. Just to go into any random GoMeetup, they'll probably be there. Alright.

Shay Nehmad:

Let's talk some proposals.

Jonathan Hall:

Yeah. We got a bunch of them today. That's gonna basically be the rest of the show, I think. First up, this is kinda quick. We already talked about it.

Jonathan Hall:

The proposal for UUID package has been accepted, finally. It was it was likely accept something like fifteen years ago, and then there was some controversy, and it finally made it to accept. And then almost immediately, they opened up an amended proposal to change the name of uuid.nil, the method or the function that would return the nil UUID. The reason for this is that nil has an overloaded meaning in the context of Go because, of course, there's a nil in Go, right? And that's not what it returns.

Jonathan Hall:

It doesn't return nil. It returns the, what in Go terminology would be the zero value for a UUID, but it's called nil in all the other popular implementations of UUIDs in Go, and it's called nil in the UUID RFCs themselves. So that's why there's this conflict. So there was a question about should we call it UUID dot zero instead or just get rid of it entirely? That proposal is still open.

Jonathan Hall:

We'll put a link to that in the show notes too, but it's currently in likely decline, meaning that they'll they're not gonna change it, and they'll probably stick with UUID dot nil as the the function name. But if you have some reason to want to opine on that or more more than opine, like, you should actually have some valuable data to bring to the discussion, you're welcome to comment on that probably for the next week.

Shay Nehmad:

Yeah. This is a very, very like, there's a ton of discussion here. Like, way more than I expected for basically take the Google package and bring it into the standard library, which is like sort of what happened. They made it slightly nicer.

Jonathan Hall:

It's a little bit smaller. Like, they don't support as many versions that the Google package does. And they instead of using exported package variables for nil, they use a function, and they export a max function as well. I don't think the Google package does that. But otherwise, it's virtually the same shape as the Google package.

Shay Nehmad:

Yeah. You, by the way, are mentioned in the design of this of this package specifically on modification. So you wanna explain what is in inverted modification of the variable that you've found?

Jonathan Hall:

So, I was in favor of using a function rather than an exported package variable for the simple reason that an exported package variable can technically be modified at runtime.

Shay Nehmad:

So, clarify, there's a package UID in the standard library and it has a variable called nil. And I, in my code, can choose to do like UID dot nil equals not like a new UID, and now it's not a nil UID anymore.

Jonathan Hall:

Right. And and that same sort of foot gun, if you will, already exists in several places in the standard library.

Shay Nehmad:

The classic is HTTP client. That's why I always tell people, oh, HTTP server or whatever. I'm like, never use the default one.

Jonathan Hall:

Yeah. That's true. Although that's that's subtly different, and I'll talk about that. A really good example where it says actually a sentinel value would be IO dot EOF. So you could change IO dot EOF?

Jonathan Hall:

You absolutely can. It's an exported package variable. It's not a constant. It's not a function. It's a variable.

Jonathan Hall:

So that's that's a that's probably the most ubiquitous example of the exact same thing of a of a sentinel value that you can change. So you could set io dot eof equals file not found or, you know, whatever silly error message you want. You could do that. So and I and I've I've, for a long time, thought this was kind of silly, and, you know, we we shouldn't do that. But, of course, we can't change IO dot a o f or these other cases because they're of the compatibility guarantee.

Jonathan Hall:

The difference with what you just talked about with clients and an HTTP server and the default loggers in both the log and the SLOG packages and things like this are that these are actually meant to be changed. These are things that you're intended to set up your global logger or your global HTTP client. So they're they're intentionally modifiable. I still think it's a bad pattern, but it's a different bad pattern. Like, it's not a it's not a fake constant.

Jonathan Hall:

So I distinguish those two in my mind. Okay. Anyway, I I was making the point on this proposal that we should use the function version because if if we return a nil value, then you can modify it all day long and it won't change the the value when you call that function again. Right? It always returns a new copy of the the nil value.

Jonathan Hall:

So that was my argument.

Shay Nehmad:

And and what like, it will always return a new zero value is what you're saying?

Jonathan Hall:

Exactly. Exactly. Okay. So if I accidentally or intentionally modify my my return zero value,

Shay Nehmad:

That's on you.

Jonathan Hall:

It won't affect other callers of that function.

Shay Nehmad:

Got it. And despite your despite your overwhelming evidence and clearly eloquence of the problems, it's variables anyway.

Jonathan Hall:

No. It's not variables. They they decided to go with the the function.

Shay Nehmad:

Oh, you convinced them because originally, it was variables.

Jonathan Hall:

Originally, it was variables. They switched to functions. They switched back to variables. And I was like, I I don't think this is good idea. And and Neil was like, we need some evidence.

Jonathan Hall:

So I I did some digging. I spent a couple hours with with I think it was Claude, we and dug up some bug reports. And I I really found only one where somebody was scanning from SQL into UUID dot nil, and that would, of course, overwrite UUID dot nil. I think it's a pretty weak argument, honestly. Like, I don't know why somebody would actually do that except to prove a point, but was enough prove a point.

Shay Nehmad:

Prove a point, then it worked. So I really can't argue with the result. So, anyway,

Jonathan Hall:

they they did they did make the decision to to make that change, so I'm happy about that.

Shay Nehmad:

Cool. And this is not beside the point, but I'm I'm I am very interested in your opinion.

Jonathan Hall:

Okay.

Shay Nehmad:

Today, in Codebases, I wouldn't say that there's one right way to define a UUID type. So you have a struct and you have a UUID inside it. You could have chosen a string and just be like, oh, I used the string representation. That's probably bad. You could have chosen a buffer and that's okay, but then you write your own, or you could have chosen a specific UID library.

Shay Nehmad:

And I would have all of them are not great. I would probably were I to do, you know, code review, I would say, oh, probably use the third party UID type, specifically the Google UID library, which is definitely the most popular. Right? Are you going to start in code reviews saying strictly this variable is a UID? Please use the UID type from the standard library in the same way that you would do for IP addresses?

Jonathan Hall:

It will depend on context, but in general, probably so.

Shay Nehmad:

The I I'm, like, so in favor of doing that because so much code that I I have to deal with is, well, you know, this is a string, but, actually, it's a UID or this is a string. But, actually it's a this is a number, but actually it's a port. And I One mean having

Jonathan Hall:

of my clients has a large no, it's not that large, but a code base that heavily uses strings everywhere for UUIDs, and I've been converting. And the main reason is additional type safety at the API layer, so it's a REST API. When you try to unmarshal into UID, you can't unmarshal random non UID strings, right? So you get some type safety there. And then the same at the database layer.

Jonathan Hall:

So in this particular case, the application uses Postgres with the UUID column type, but there's nothing in the application to prevent me from trying to pass, you know, the word chicken as a UUID, which of course the database won't accept, but everything So, else the application you know, there's mismatch there between the types. So, I do think it's better for consistency to use the same type throughout.

Shay Nehmad:

So, it's basically a new best practice where we are going to have to adopt because the there was reasoning to say, well, it's a third party library. If I haven't imported it so far, maybe I won't.

Jonathan Hall:

Yeah, I suppose. But unless it's just like one or two uses, that's a pretty weak argument, in my opinion. If you've adopted UIDs as as your your application approach, you should use a library. Whether it's standard or or third party, you need a library to handle it.

Shay Nehmad:

Cool. So accepted, and is it already implemented? When when are we gonna

Jonathan Hall:

see it? I expect we'll see it in 01/27. I don't know if it's actually implemented. It's still open, so it hasn't been closed yet. But I just I think it's it's largely depending on the

Shay Nehmad:

results of this. They can copy the implementation from the existing library. Subproposal about whether

Jonathan Hall:

or not to rename nil to zero. So once once that's resolved, which should happen next week, I expect, then they'll probably be inputted quite quickly.

Shay Nehmad:

Alright. Next proposal is also accepted, and I think we also discussed this one.

Jonathan Hall:

We might have.

Shay Nehmad:

So maybe we can cut

Jonathan Hall:

it. Uh-huh.

Shay Nehmad:

We're gonna talk beginning and we'll cut the last part.

Jonathan Hall:

So the proposal has been accepted and actually implemented, it looks like. This one's already in tip, so it's to add cut last for strings and bytes. So it works just like cut, except that it cuts the last thing rather than, I guess, the first one. Right?

Shay Nehmad:

Yeah. It's like trim suffix, I I would call it. They've decided to call it cut last,

Jonathan Hall:

but Except it doesn't remove it doesn't discard the suffix. It gives it back to you.

Shay Nehmad:

Oh, that's true.

Jonathan Hall:

Where a trim suffix just chops it off and you get whatever is there. So it's one of these, like, little trivial spring functions that every language has, you know, 50 of these, and they're all suddenly different. You never remember which one you need until you go look it up, but it's nice to have them because otherwise, you end up reimplementing them yourself.

Shay Nehmad:

Yeah. And there there is a lot of people who are saying, oh, this is actually I found 15 cases of this in my code. I I know it's not a very strong argument to putting it in the library, but I do think it's a good one in this case. And by the way, to just for the naming where I say, oh, it should have been trimmed. Well, there is a comment here which I really, really liked from Axel Wagner, just like, okay.

Shay Nehmad:

Here are the names of families of functions we have. We have contains, contains any, contains func, contains runes. So you have, like, the contains family. You have the has family, which has prefix and has suffix. You have the cut, which is, like, maybe remove a thing.

Shay Nehmad:

I don't know if it actually did remove it or not. You have cut cut prefix and cut suffix. So he's, like, trying to show all the all the different families, and there's there's somewhat there are inconsistencies, which I really like. But they are gonna keep it as cut last, which makes sense.

Jonathan Hall:

Let's take a break from proposals. I'm tired of this. Let's talk about something else.

Shay Nehmad:

Yeah. If you remember, and I won't forgive you if you forgot because it's been a while, we hosted George Adams from Microsoft.

Jonathan Hall:

Oh, yeah.

Speaker 3:

Yeah. Yeah. I guess hey, folks. My name is George Adams. I'm a software engineering manager at Microsoft, where I lead the team behind the Microsoft Builder Go.

Speaker 3:

Our kind of primary purpose is that we maintain a downstream distribution of Go that powers major services like, AKS, Azure Kubernetes Service, GitHub, many other first party customers.

Shay Nehmad:

So ever since then, I've been subscribed to the blog we talked about in the in this in that episode, which was the new and back at the time exciting, Microsoft Forgo developers. Mhmm. Since then, the only thing that's like, oh, it's one person called Davis with the same copy paste blog post with zero engagement on it, which is Microsoft builds are now available for a new version of Go, which might be I don't know. It it might be automatic, like, or something.

Jonathan Hall:

I hope it is. Because if it's not, feel sorry for Davis having to write these same thing. Yeah.

Shay Nehmad:

It to type it out. So, yeah, there are Microsoft releases for new Go version. So if you're working on a Windows machine, that's maybe relevant to you. Also, mostly, I think it's relevant for the Go developers inside Microsoft. Why am I highlighting this?

Shay Nehmad:

I am speaking to you from a Microsoft Windows 11 machine. What? Yes. It's been a while. Is it

Jonathan Hall:

running Go one twenty six two dash one?

Shay Nehmad:

It is. It is. I specifically set it up before the show. I clicked on the, like, available to download and went to the download and install guide for, you know, Microsoft Build of Go and whatever, you know, like the OEV, whatever the binary archive installed it with the Go dash install PowerShell script. I did the whole thing.

Shay Nehmad:

Yes. It was it was very underwhelming.

Jonathan Hall:

Yeah. Why is you running Windows 11 news? I mean, I I I saw let me just share my ignorance here. I don't I don't know what the current version of Windows is. I feel like Windows 11 has been talked about for a long time, so it must be for the

Shay Nehmad:

most reason. The important part is I am on a Windows machine for the first time in, like, a couple of years. Oh. And and this is actually the first time ever recording this episode with you from my Windows machine. So my Windows machine is almost strictly just for gaming.

Shay Nehmad:

But now and then when I moved to America, I, like, packed up the important bits, like the GPU and and the and the important, like, expensive stuff. Mhmm. But I kept the the tower in Israel.

Jonathan Hall:

Okay.

Shay Nehmad:

And now I finally got a tower and well, it's AI. It's actually my wife assembled it, back together and got it working. But now I'm also excited to use it for, like, AI because it's a really good GPU, so I can, like, run really good local models in my home. So I'm I'm starting to set it up as a as a development machine again.

Jonathan Hall:

So are are we supposed to be able to feel sorry for you that you're using Windows? Is this week's Patreon subscription going to you to help you upgrade to a better operating system?

Shay Nehmad:

No. I I actually actually, I missed it. Oh. So the Go news angle of it is that the Go new release is available for like, the Microsoft build of Go is available. It was just a way for me to share of of that I am talking to you from a Windows machine.

Shay Nehmad:

And you know what? It has colorful spinning fans, so it's fancy and gamery.

Jonathan Hall:

Got it. Alright, Shay. Well, I'm sorry to hear you're using Windows, but I'm glad you're enjoying it at least. The Stockholm syndrome is real. Yeah.

Jonathan Hall:

One last accepted proposal for this week. H two c has been deprecated. You Do know what H2C is? H2C.

Shay Nehmad:

Honestly, do not.

Jonathan Hall:

Yeah. A few people probably do. It's something I actually use occasionally for testing. It is HTTP two without encryption. Oh, wow.

Jonathan Hall:

So HTTP two by default is like it's just it's just it includes TLS, right? So it's not like TLS is this add on. It's built into HTTP two. If you want to disable that, you have to do it differently, and that's what H2C is for. There's a new way to do it.

Jonathan Hall:

So it's not that you can't do it anymore, but there's a new way to do it the old way, the H2C back to H2C package is being deprecated. I didn't even know there was a new way to do it. So when I saw that this happened, I went to my code that uses H2C and updated it. So I'm already using the new version now. So this won't affect a lot of people.

Jonathan Hall:

But if you use HTTP two and you use H2C, most likely in tests, then you'll need to worry about this and and make that change at some point. It's being deprecated, not deleted. You know, it'll still work. Just don't don't use it

Shay Nehmad:

for new stuff. So generally, should I like disable encryption in test for HTP because it's faster or what? Like, why did you do it?

Jonathan Hall:

It probably depends on what you're testing, but it's easier. I mean, you can go to the effort of setting up test certificates and making sure that your client and server accept them from each other and stuff like that. It can be done. And I usually do do that, but I also disable it, you know. So I'll have a test that verifies that works, then I usually disable it for the other test just to be simpler.

Jonathan Hall:

The other time I disable it is if I'm using something like gRPC over WebSockets, which I do on one app I'm building. So I still use TLS, but at a different layer of the protocol. So it's not like it's unencrypted traffic over the Internet. But so there are reasons that you you need to disable h t or TLS for HTTP two, but they're they're corner cases. So if you

Shay Nehmad:

deal with one corner cases It's not the general rule for you that, like, in tests, you disable encryption.

Jonathan Hall:

Right.

Shay Nehmad:

Right. Especially if it does actually go out to a third party.

Jonathan Hall:

Sure. Sure.

Shay Nehmad:

Yeah. Now that I know about this feature, I'm like, oh my god. I wonder how many servers, like, misconfigured it and I can actually turn off the encryption. But probably it's fine.

Jonathan Hall:

It's probably. Alright. I think that's it for the news. I think we have just a few little things to wrap up before the show is done.

Shay Nehmad:

Yeah. Glad to be back. This was cool. Doing the show was cool. I'm learning about Go.

Shay Nehmad:

As I mentioned at the top of the show, this, show is sponsored by you. There's a hobby we do it for fun, but, it does have its associated costs other than the mental cost of Jonathan making fun of me for using a Windows machine. We pay for editing fees and hosting fees, etcetera. If you wanna support the show, you can do it directly via Patreon and support us financially, which is a lot of the best way to show support for us. You can find the link to Patreon, past episodes, our Slack channel, our email, our swag store, all at cup o' go dot dev.

Shay Nehmad:

That is cup o' go dot dev. Other than that, the best way to support us, again, than directly financially is to share the show. We don't pay for advertising and we don't plan to, so word-of-mouth is the only way this show gets to other people. Tell this tell, like, you know, your coworker or your friend or your co students about the show, and leave a review on Spotify, Apple Podcasts, or wherever you listen to your podcast. You have something exciting to update about.

Jonathan Hall:

I do. I have decided after many years of thinking about it to finally launch a course about how to do idiomatic testing in Go. So if you're interested in attending, I have special early bird pricing available till April 28, so it's just about two weeks from now. The course will start May 5. Go to boldly go.tech/testing-course.

Jonathan Hall:

You see all the details about it. There's a few videos you can watch. We'll be talking about the same topics. If you'd like to learn how to write idiomatic tests in Go, learn why I don't like Testify and when I use it anyway, how to avoid mocking hell, and all sorts of things related to testing and Go, if that's interesting to you.

Shay Nehmad:

Cool. So I assume it's like 20% about mocking and testifying, 80% about using unencrypted h two c h t p two connections?

Jonathan Hall:

Pretty much. Yeah. Yeah.

Shay Nehmad:

Who is this course in partnership with?

Jonathan Hall:

It's just me. I decided to do it. I've I've talked about this, at some, various meetups and conferences. I've done, of course, videos about it. It's always a popular topic, and I always get people asking great questions.

Jonathan Hall:

And so I've decided to turn it into a course. Very, very, very cool. Boldlygo. Tech. Boldlygo.

Jonathan Hall:

Tech slash testing course.

Shay Nehmad:

And in boldlygo. Tech, I can also find a way to engage you. Right?

Jonathan Hall:

You can find my daily email list I send out almost every day. Aim for five days a week, sometimes it's four or three. Little tips on how to improve your go. I'm going through the S Log package right now and sort of breaking it down. It's a great

Shay Nehmad:

it's a great resource, and maybe even hire you. Although, I don't know if you're looking

Jonathan Hall:

for You could definitely hire me. Definitely available for that.

Shay Nehmad:

Very, very cool resource.

Jonathan Hall:

Cool. Well, Shay, I I don't think I'm gonna see you next week, but We will see. We'll we'll do something. We'll have a show. It just may not include me.

Shay Nehmad:

We'll see what happens. We'll see what happens. But it's fun to be back, and I might be gone again soon. Depends on JD Vance, I guess.

Jonathan Hall:

Oh, yes.

Shay Nehmad:

Alright.

Jonathan Hall:

It's never a good good phrase to say.

Shay Nehmad:

Program exited. Program exited.

Creators and Guests

Jonathan Hall
Host
Jonathan Hall
Freelance Gopher, Continuous Delivery consultant, and host of the Boldly Go YouTube channel.
Shay Nehmad
Host
Shay Nehmad
Engineering Enablement Architect @ Orca
A Nil by any other name
Broadcast by