text
stringlengths
0
1.49k
People, for fun, implement the mandelbrot set, or something, but other than that they don't have very many valid uses.
On the other hand, lots of things relatively use bigints, and those are kind of a pain to use because you can't use + and - and the built in operators; you have to call all these methods. So we're kind of in this weird position where complex numbers are first class in Go, but nobody uses them, but big integers used in ...
There's another proposal from Rob to make bigints just be automatic. The int type, rather than being 32 bits on 32-bit machines and 64 bits on 64-bit machines, it's just... An int means a bigint, and you implement it as efficiently and possible, and you have the compiler prove things, so if the compiler can prove it's ...
**Erik St. Martin:** I think my first thing that I would get rid of is `new`.
**Brian Ketelsen:** `new` vs. `make`?
**Erik St. Martin:** I mean, most people don't use it, so it usually only confuses newcomers, right? Most of us just declare a literal and get the pointer to it. And you find that a lot of people coming into the language, it looks like there's multiple ways of declaring stuff, right? You can do `var name =`, you know.....
**Brian Ketelsen:** `make`... \[laughter\]
**Erik St. Martin:** So then, what would your proposal be to declare things, like slices and arrays?
**Brian Ketelsen:** We already have lots of ways to declare memory... I don't think `make` adds anything to the bundle, and it just adds confusion. This is coming from someone who teaches Go. Why do we have to make slices and why do we have to make maps, when we declare everything else with var?
**Erik St. Martin:** But the interesting thing here though is that you can also declare capacity, right? And in some cases that matters.
**Brian Ketelsen:** I'm not arguing whether it's useful, I'm just arguing that I would change it somehow. I don't have any solutions.
**Brad Fitzpatrick:** Well, if Go 2 had _Generics_, you can imagine slices and maps being a type in a package in the standard library, and you can set bytes.new, or slice.new, or maps.new, or something like that.
**Erik St. Martin:** Yeah, that's true, too.
**Brian Ketelsen:** See?
**Erik St. Martin:** Yeah. How about you, Carlisia? What would you ax?
**Carlisia Thompson:** I can't think of anything, but I really like your idea Erik, to get rid of `new`. I'd vote for that.
**Erik St. Martin:** Yeah, and it's just rethinking the way things are declared. There's just a lot of ways till you run across many of them... A lot of people who have been around the language have their standard way of doing things in different use cases, but...
**Carlisia Thompson:** I have one. The naked return - is it called that?
**Brian Ketelsen:** Oh, yeah.
**Carlisia Thompson:** We need to get rid of that.
**Brian Ketelsen:** That's good.
**Erik St. Martin:** I used to use that all the time when I first started programming Go, and now I never use it.
**Brad Fitzpatrick:** Yeah, it's a little unfortunate that naked returns and named result parameters are coupled... But yeah, naked return could probably go. Or let's say you have a function that returns a time.time, an error, and you just wanna omit -- you only wanna return the error, you just want the zero value of e...
**Erik St. Martin:** Oh yeah, that'd be interesting.
**Brian Ketelsen:** Yeah, I like that.
**Erik St. Martin:** That's one of the things I'm talking about with the declaration... I don't really care for the empty struct literal, like the time.time{}... It adds no context, because you're not initializing with anything. So that'd be really cool, to be able to use just the zero value in kind of a quicker, short...
**Brad Fitzpatrick:** There's also some weird things in Go, like ranging over a string gives you the UTF-8 code points, rather than the bytes of the string, and it's the only thing in the language really that ever assumes that strings are UTF-8. So it's kind of this weird wart and there's lots of those weird little war...
**Erik St. Martin:** Yeah, that's interesting. And I guess that that would become a problem too, because some of the libraries assume the output is a string, rather than a slice of bytes, so you're kind of stuck there.
**Brad Fitzpatrick:** I think that's one of the other big things that needs to be changed, the fact that slices of bytes and strings are so identical, but also so separate that you have to have the whole bytes package and the strings package that are duplicated, and switching between those worlds is so expensive... I d...
**Erik St. Martin:** That happens a lot because most packages end up assuming you want to deal with strings so your package takes in your string and then it does a bunch of stuff as a byte slice with it and then returns you a string but the problem is when we start glueing those libraries together we have it wrapped ar...
**Brad Fitzpatrick:** Actually, I had a proposal way back to rechange the language in the whole standard library to assume there was a type that meant a readable view of memory. A string promises that nobody in the world can ever change it including you and a byte slice says you can change it and other people could be ...
**Erik St. Martin:** That's interesting. So basically it could accept a string or a slice of bytes. You just wouldn't be able to write to it you could only read.
**Brad Fitzpatrick:** Yeah, I had this [mem](http://expgodoc.appspot.com/pkg/exp/mem/) package and there was a `mem.rw` type and a `mem.ro` type and so the read only memory type or the writable memory type.
**Erik St. Martin:** I'd be interested to actually see that proposal.
**Brad Fitzpatrick:** I just pasted a link in the Slack channel to the docs for it.
**Erik St. Martin:** Alright, everybody wanna do _Free Software Friday_?
**Erik St. Martin:** I am gonna take silence as a _Yes_. \[laughter\]
**Carlisia Thompson:** Yep, let's do it.
**Brian Ketelsen:** Sorry I was muted because of all the various saws in my house right now.
**Erik St. Martin:** Oh your construction?
**Brian Ketelsen:** Yeah.
**Erik St. Martin:** Every week we'd like to give a shoutout to projects or maintainers of open source software to show the love. So this week Carlisia do you want to kick it off?
**Carlisia Thompson:** Yeah, so this week I wanna give a shoutout to the [Changelog](https://github.com/thechangelog/changelog.com) website. It's a piece of art and especially I'd want to give a shoutout to Jerod because he is the main lead on that project and I especially love the _Search_ feature. It makes me so happ...
**Brian Ketelsen:** Nice!
**Erik St. Martin:** How about you Brian?
**Brian Ketelsen:** Well I have done this before but I am gonna do it again because it just makes me happy. [Buffalo](http://gobuffalo.io/docs/getting-started) for web development. It just cannot knock out a website any faster in Go than you can with Buffalo and somebody asked me in the Buffalo channel on Slack today w...
**Erik St. Martin:** It seems like the GopherCon and GopherAcademy website are staging environments for any cool project written in Go. We had [Caddy](https://caddyserver.com/) running way early and we shouldn't have had it in production.. and ah let's launch the GopherCon website with it...
**Brian Ketelsen:** Why not...I have a good eye for picking these things I am telling you.
**Erik St. Martin:** We had [Hugo](https://gohugo.io/) among the CMS stuff and \[unintelligible 01:16:50\]. How about you Brad did you have anybody you'd wanna give a shoutout to?
**Brad Fitzpatrick:** No, no I am busy reviewing Carlisias code review... \[laughter\]