Live data from Hacker News

Russ Cox is stepping down as the Go tech lead

groups.google.com

391–396 of 396 posts

Re: Russ Cox is stepping down as the Go tech lead

#391

Earlier quoted context omitted.

What basic properties no longer hold?

Uninitialized variables are zero. Composite literals may omit fields, and they'll be zero. Map accesses for nonexistent keys return zero values. Channel receives from closed channels return zero values. make returns zero-valued slices. Comma-ok style type assertions return zero values. Slices are fat pointers where the zero value avoids an allocation for data.

That would still hold. Those things just wouldn’t be typed as non-nullable.

Re: Russ Cox is stepping down as the Go tech lead

#392

Earlier quoted context omitted.

Uninitialized variables are zero. Composite literals may omit fields, and they'll be zero. Map accesses for nonexistent keys return zero values. Channel receives from closed channels return zero values. make returns zero-valued slices. Comma-ok style type assertions return zero values. Slices are fat pointers where the zero value avoids an allocation for data.

That would still hold. Those things just wouldn’t be typed as non-nullable.

Now you're creating a flavor of types that cannot be used in many places. Or worse, a flavor of types that when added to a struct breaks existing uses. That'd be a major change.

Re: Russ Cox is stepping down as the Go tech lead

#393

Earlier quoted context omitted.

That would still hold. Those things just wouldn’t be typed as non-nullable.

Now you're creating a flavor of types that cannot be used in many places. Or worse, a flavor of types that when added to a struct breaks existing uses. That'd be a major change.

> Now you're creating a flavor of types that cannot be used in many places.

Yeah, that’s the entire point. Type safety.

Re: Russ Cox is stepping down as the Go tech lead

#394

Earlier quoted context omitted.

Now you're creating a flavor of types that cannot be used in many places. Or worse, a flavor of types that when added to a struct breaks existing uses. That'd be a major change.

> Now you're creating a flavor of types that cannot be used in many places. Yeah, that’s the entire point. Type safety.

Sigh. Yes, everyone knows what the goal is. But that goal is in conflict with the design decisions made in Go, and there's no clear path forward. You're not responding at all to the actual implications of types without zero values. There's no such thing as a "type that cannot be sent over a channel" or "a type that cannot be a map value" or "a type that when added anywhere in a composite type prevents omitting fields in composite literals" or "a type that cannot be comma-ok type asserted to". And it's highly unlikely such concepts will be added to the spec.

You'd have to start by constructing replacements for all those mechanisms, then migrate all Go source code in the world over to the new APIs, just to enable Go to have types without zero values.

Re: Russ Cox is stepping down as the Go tech lead

#395

Earlier quoted context omitted.

Well written list of what made Go better language during last years. I'd add iterators, the recent big thing from Russ.

Iterators and generics go against the original goals of Go - simplicity and productivity. They complicated Go language specification too much without giving back significant benefits. Iterators and generics also encourage writing unnecessarily complicated code, which makes Go less pleasant to work with. I tried explaining this at https://itnext.io/go-evolves-in-the-wrong-direction-7dfda8a1...

Totally agree, as far as I know Rob Pike no longer develop Go, that's why. Came corporate people instead who think they do their work, asking community (who said that it should be asked?) what new cocojamba feature should be added (like js)

But what can we do against of this? This what I think: - stuck to use Go 1.16 - fork Go 1.16 and continue develop lang from there - learn OCaml... - give up and consume what these people decide to add to lang next and everytime feel disgust

Re: Russ Cox is stepping down as the Go tech lead

#396

Earlier quoted context omitted.

Go provides generic types since v1.0 - maps, slices and channels. Go also provides generic functions and operators for working with these types - append, copy, clear, delete. This allows writing clear and efficient code. There is close to zero practical need in user-defined generic types and generic functions. Go 1.18 opened Pandora box of unnecessary complexity of Go specification and Go type system because of gener…

tell me, how often do you find yourself writing `interface{}`?

Very rarely
Post reply on HN