Live data from Hacker News

Lies we tell ourselves to keep using Golang

fasterthanli.me

21–30 of 561 posts

Re: Lies we tell ourselves to keep using Golang

#21
post #9

> Go's confusion between "type aliases" and "newtypes". The only way to make a newtype in go is to make a separate package with an opaque type and use interfaces for indirection, which is costly and awkward. It's very unclear what this is supposed to mean. 'type Foo int' in Go creates a new 'Foo' type that can't be used as an int without casting (a̶l̶t̶h̶o̶u̶g̶h̶ ̶y̶o̶u̶ ̶c̶a̶n̶ ̶a̶s̶s̶i̶g̶n̶ ̶a̶n̶ ̶i̶n̶t̶ ̶t̶o̶ ̶i̶t…

> 'type Foo int' in Go creates a new 'Foo' type that can't be used as an int without casting (although you can assign an int to it).

You can't, in fact:

    type Foo int

    func main() {
        var foo Foo = 1
        var bar int = 2

        foo = bar // cannot use bar (variable of type int) as Foo value in assignment
    }
The reason you can do things like:

    var foo Foo = 1
is that because numeric literals in Go are not ints, they are untyped [0].

[0] https://go.dev/blog/constants

Re: Lies we tell ourselves to keep using Golang

#22

What's up with the anti-Golang shitposts lately? I liked fasterthanlime better when he didn't just sound like a card-carrying Rust zealot. This isn't even about the practicalities of his argument really; optics matter, and it's especially bad since the Rust community used to be known for its politeness and always being fair to other language communities.

Calling a well documented blog post, even one you disagree with, a "shitpost" should be an embarrassment to you.

Guy makes a blog post about Go a few years ago. It gets posted here time and time again, not of his doing. A bunch of people challenge his premises, so he makes another post diving deeper into his arguments.

So what?

What's up with the literal hundreds of "Golang is amazing" posts this site has had? Is someone attempting to express dissent clearly that much of a bother?

Re: Lies we tell ourselves to keep using Golang

#23
post #20
post #10

Oh no, here we go again. So you don't like Go (no idea what this "golang" thing is everybody keeps talking about)? That's cool! You don't have to write yet another blog post saying that you really, really don't like it, with more strawman arguments and again quoting that quoted-to-death quote by Rob Pike about Go being designed for stupid developers, we got you the first time!

> no idea what this "golang" thing is everybody keeps talking about The Go FAQ can help you understand where this is coming from: https://go.dev/doc/faq#go_or_golang

I'm surprised this isn't mentioned, but "golang" is much easier as a keyword to search for then 'go' as well.

Re: Lies we tell ourselves to keep using Golang

#24
post #8

Earlier quoted context omitted.

From the outside the Rust community seems so defensive about Go that it makes me very reluctant to dive deeper into Rust.

I use both & like both. Ignore the noise!

Yeah, same. They’re both nice languages, they both have great tooling, and they both have areas where they shine. I don’t see them as competitors really, but “You can also implement X in Y” is a fairly useless statement, of course you can.

I’m glad we have as many languages options as we do, and I enjoy writing a variety of languages for a variety of different projects. Sure, I have moments where I think “ugh why can’t I do X in language Y” or “C is cleaner in Y” etc etc.

I’ve found helpful people, critics, and fanatics in every language community. Don’t let that dissuade you from learning Rust (or Go, or …)

Re: Lies we tell ourselves to keep using Golang

#26
post #9

> Go's confusion between "type aliases" and "newtypes". The only way to make a newtype in go is to make a separate package with an opaque type and use interfaces for indirection, which is costly and awkward. It's very unclear what this is supposed to mean. 'type Foo int' in Go creates a new 'Foo' type that can't be used as an int without casting (a̶l̶t̶h̶o̶u̶g̶h̶ ̶y̶o̶u̶ ̶c̶a̶n̶ ̶a̶s̶s̶i̶g̶n̶ ̶a̶n̶ ̶i̶n̶t̶ ̶t̶o̶ ̶i̶t…

> 'type Foo int' in Go creates a new 'Foo' type that can't be used as an int without casting (although you can assign an int to it). You can't, in fact: type Foo int func main() { var foo Foo = 1 var bar int = 2 foo = bar // cannot use bar (variable of type int) as Foo value in assignment } The reason you can do things like: var foo Foo = 1 is that because numeric literals in Go are not ints, they are untyped [0]. [0…

Ah yes, good point. Thanks for the correction.

Re: Lies we tell ourselves to keep using Golang

#27
I don't know nothin' about Go. But this complaint really surprised me:

> Go not letting you do operator overloading, harking back to the Java days where a == b isn't the same as a.equals(b)

Does this guy really not understand that in a mutable language, (eq ...) is not the same as (equalp ...) and should never be confused with it?

Also: operator overloading is the spawn of Satan.

Re: Lies we tell ourselves to keep using Golang

#28
post #13

What's up with the anti-Golang shitposts lately? I liked fasterthanlime better when he didn't just sound like a card-carrying Rust zealot. This isn't even about the practicalities of his argument really; optics matter, and it's especially bad since the Rust community used to be known for its politeness and always being fair to other language communities.

I might not agree with fasterthanlime's opinion on Go (9/10 times I would opt to use Go over Rust), but calling this post a "shitpost" is unnecessarily dismissive. The post, like his previous post on Go, contain well thought out points that add to the discussion at the very least. Also I like his sense of humour :) Edit: though, I suppose saying Go is not designed is also equally unnecessarily dismissive and hyperbol…

> Portland Oregon, the capital of grunge, coffee, poor weather and whiteness

it's kinda a shitpost

Re: Lies we tell ourselves to keep using Golang

#29
post #10

Oh no, here we go again. So you don't like Go (no idea what this "golang" thing is everybody keeps talking about)? That's cool! You don't have to write yet another blog post saying that you really, really don't like it, with more strawman arguments and again quoting that quoted-to-death quote by Rob Pike about Go being designed for stupid developers, we got you the first time!

I don't have a horse in this race, but as for "Go" vs. "golang" - I imagine people use "golang" as it's a bit more clear that you're talking about a specific thing (the programming language), as opposed to a fairly common English word (and a board game, and probably some other uses).

From https://go.dev/doc/faq#go_or_golang:

Is the language called Go or Golang? The language is called Go. The "golang" moniker arose because the web site was originally golang.org. (There was no .dev domain then.) Many use the golang name, though, and it is handy as a label. For instance, the Twitter tag for the language is "#golang". The language's name is just plain Go, regardless.

Re: Lies we tell ourselves to keep using Golang

#30
post #10

Oh no, here we go again. So you don't like Go (no idea what this "golang" thing is everybody keeps talking about)? That's cool! You don't have to write yet another blog post saying that you really, really don't like it, with more strawman arguments and again quoting that quoted-to-death quote by Rob Pike about Go being designed for stupid developers, we got you the first time!

Blog post is just one part, This person is whining about critical feedback received on HN at Twitter. Screenshotting users and comments for Twitter likes. For someone who doesn't like Go , they surely obsesses a lot about it.
Post reply on HN