Hacker Newsnew | past | comments | ask | show | jobs | submit | crtc's commentslogin

https://en.wikipedia.org/wiki/Plan_9_from_Bell_Labs since the author seems to be confused in this regard.


It accesses the module proxy proxy.golang.org, which is run by Google. If you want to opt-out of this module mirror, you can turn it off by setting GOPROXY=direct.

The proxy has a clear privacy policy: https://proxy.golang.org/privacy It collects anonymized usage metrics like other package registries (rubygems.org, nuget.org, crates.io) do.


Okay, thanks. Seems harmless enough and has an opt out.


True, I quickly checked

https://rubygems.org/

https://www.nuget.org/packages

https://crates.io/

... they all show download statistics of their packages.


Which also serves a useful purpose for devs, it's an easy way to avoid typosquatting by making sure you're not looking at a package with a similar name to the one you want but with only 2,000 views instead of 2,000,000


His name is really Sims?


Yet another example of nominative determinism: https://en.wikipedia.org/wiki/Nominative_determinism


For other Sims, Ben Sims is a techno DJ: https://ra.co/dj/bensims


This is by design: https://go.dev/doc/faq#Does_Go_have_a_ternary_form

Ken Thompson added ?: to B / C and then he took it from us in Go due to the wisdom he gathered in between.


The if-else form, although longer, is unquestionably clearer.

I disagree:

- The variable name is repeated three times, increasing visual clutter and the chance of typos.

- The variable can't declared immutable. In Java/JS/Dart/etc it's nice to know that after "const x = foo ? bar : baz", x won't change.

And you don't even have to add a new operator, Rust and Kotlin get these benefits with an expression form of if/else.


> A language needs only one conditional control flow construct.

And yet, Go has a switch statement.


Not only that, but despite all of the other syntactic sugar Go is lacking (usually sorely, such as a “try” error handler), the switch statement is really just an “if” statement in disguise.

    var someVar, anotherVar string
    // ...
    switch {
    case someVar == "whatever":
        fmt.Println("Tell me how, exactly,")
    case anotherVar == "nope":
        fmt.Println("this compiles to a jump table?")
    default:
        fmt.Println("Spoiler: it doesn't.")
    }


> the switch statement is really just an “if” statement in disguise

If the switch is over a fixed set of strings, then can't the backend generate a perfect hash function ala gperf and then proceed to use the computed hash value to implement a jump table?

Also, FWIW, the only compiler backends I've ever seen blindly emit a jump table all died in the '80s. Jump tables aren't always the fastest choice: https://www.cipht.net/2017/10/03/are-jump-tables-always-fast...


Go currently uses a binary search for integer switches (and I believe serial comparisons otherwise). Jump tables are in development and likely to appear around 1.19 or 1.20. As you say, there's a lot of edge cases to consider when figuring out whether a table or comparisons are the better choice.

https://go-review.googlesource.com/c/go/+/357330/


> can't the backend (...) implement a jump table?

Note that my example “switches” over two independent variables. Even if the Go compiler did generate a table, for this example it would really be generating two tables: and then we're back to the “how is this better than an `if`?” question.


And loops!


Finally! This will be the last day I see the words "Go" "lack of"/"no" and "generics" in one sentence.


I mean in Java vs. C# fights people still bring up that C# generics are reified while Java generics rely on casting and erase type information at runtime, so probably not.


Go dodged that bullet by reifying theirs!


That'll have to wait until the next release when the standard library gets updated... But soon!


I'm sure you'll see plenty of comments saying "Go generics lack support for X". Just ignore them — some people seem to have nothing better to do.


The release notes usually contain everything.


> No mention of why they left them out in non-interface types.

Actually it does:

"Or, we could decide that parameterized methods do not, in fact, implement interfaces, but then it's much less clear why we need methods at all. If we disregard interfaces, any parameterized method can be implemented as a parameterized function."

https://go.googlesource.com/proposal/+/refs/heads/master/des...


Except that reflection-based tools work with methods but not functions.


Yes, but reflection is part of the problem:

"And even that traversal is not sufficient in the general case when type reflection gets involved, as reflection might look up methods based on strings input by the user. So in general instantiating parameterized methods in the linker might require instantiating every parameterized method for every possible type argument, which seems untenable."

So methods with type parameters would a) not be usable with interfaces and b) not be usable with reflection.


On a somewhat unrelated note: What consequences did the Rust mod team resignation lead to? The last thing I heard was the blog post: https://blog.rust-lang.org/inside-rust/2021/11/25/in-respons...

But I haven't seen any public discussions on the future of Rust governance, how to make the core team accountable, or other consequences since.


From what I've heard, they are still working things through. These things take time and we just had a holiday in the US.


The rust core team is/was never accountable. Which is fine because the language work is done elsewhere thankfully.


What about the former core team member who also raised similarly-vague alarm bells about Rust's governance, and Amazon's involvement?

I'm somewhat invested in Rust, and it's a bit worrying to see this from two places.


He is a current core team member, not former [0].

I'm not too worried about his claims. His claim was about the Foundation being shadow-controlled by Amazon (they employed the board chair who had more influence while they lacked an Executive Director). The foundation manages the assets (donations, legal marks, etc) and has no control of the actual language. For Amazon to take control, theyd have to get the board involved and then leverage the assets against the developers. Nothing like this has happened and there is now an Executive Director.

When observing that incident, I noticed that those joining the bandwagon didn't seem to have direct knowledge of the situation. Those that did, stayed quiet or made general statements about the claims not being accurate regarding why there wasn't an Executive Director yet (interim or not). To me, this suggests something happened that, professionally, people feel should be kept confidential and I try to support that by not doing further speculation.

[0] https://www.rust-lang.org/governance/teams/core


Why? The language related work takes place elsewhere.

The term “core team” is just a misnomer.


I mean, I am pretty far from all of that and I'm not really sure how it works. It's just generally a bit worrying when you hear from a few independent sources: "don't trust (X), they're behaving badly"


To clarify then, the two groups made accusations against different people:

- A core team member made an accusation against Amazon

- The mods had concerns with the lack of oversight of the core team


[flagged]


Why? From the outside I would have assumed that was a bad thing.


I hope it is. I wouldn't trust a seven-month-old to drive my car.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: