News for hackers. Stuff that matters.
Re:Russ Cox is stepping down as the Go tech lead by hoten on Thursday August 01, 2024 @04:58PM (#41133541)
What are some things that make it well managed?
Re:Russ Cox is stepping down as the Go tech lead by ein0p on Thursday August 01, 2024 @05:05PM (#41133615)
Almost zero drama and almost no feature creep or breaking changes. The team seems to have a focus, and does not change it easily. That is important for a programming language, and it doesn’t happen organically.
Re:Russ Cox is stepping down as the Go tech lead by richardwhiuk on Thursday August 01, 2024 @05:16PM (#41133714)
I suspect all the drama happens internally.
Re:Russ Cox is stepping down as the Go tech lead by zja on Thursday August 01, 2024 @10:45PM (#41135676)
Are there any Go team members that don’t work for Google? It’s a lot easier to remain civil/avoid drama when people know each other personally, and work together at a big company with an HR department.
Re:Russ Cox is stepping down as the Go tech lead by markkrj on Thursday August 01, 2024 @10:58PM (#41135731)
Does ex-googler counts? Then Filippo Valsorda...
Re:Russ Cox is stepping down as the Go tech lead by tomcam on Friday August 02, 2024 @01:31AM (#41136347)
One reason I consider it so good
Re:Russ Cox is stepping down as the Go tech lead by gunapologist99 on Thursday August 01, 2024 @07:47PM (#41134836)
Exactly. And it's in writing!

The backwards compatibility promise:

https://go.dev/doc/go1compat

Re:Russ Cox is stepping down as the Go tech lead by vdqtp3 on Thursday August 01, 2024 @07:28PM (#41134736)
The cost being that they [generally speaking] ignore proposals, pull requests, and new features - even if they are valuable to their users and AREN'T breaking.
Re:Russ Cox is stepping down as the Go tech lead by segfaltnh on Thursday August 01, 2024 @11:15PM (#41135798)
Mostly this comes down to recognizing the value of simplicity. I like Rust and Go, but I am infinitely grateful that Go is as minimal as it is. I wouldn't have had as much success ramping my team on Rust.
Re:Russ Cox is stepping down as the Go tech lead by ahci8e on Thursday August 01, 2024 @07:43PM (#41134814)
Almost zero drama, yeah. I do remember the dep drama though...
Re:Russ Cox is stepping down as the Go tech lead by justinclift on Thursday August 01, 2024 @09:30PM (#41135352)
And the telemetry drama.
Re:Russ Cox is stepping down as the Go tech lead by sidewndr46 on Thursday August 01, 2024 @07:11PM (#41134618)
Absolutely inaccurate. Pointer de-reference operator had a breaking change after 1.x
Re:Russ Cox is stepping down as the Go tech lead by arp242 on Thursday August 01, 2024 @07:38PM (#41134790)
I don't recall this off-hand; which change was that?
Re:Russ Cox is stepping down as the Go tech lead by tweenagedream on Thursday August 01, 2024 @09:13PM (#41135264)
I mean they did say almost no breaking changes, depending how much has changed in the language, a small handful of breaking changes in niche use cases may be considered almost none by some. I'm not sure I would say the comment is absolutely inaccurate.
Re:Russ Cox is stepping down as the Go tech lead by dom96 on Thursday August 01, 2024 @05:10PM (#41133661)
Zero drama is easy when you get paid (a lot) to work on something.
Re:Russ Cox is stepping down as the Go tech lead by muratsu on Thursday August 01, 2024 @05:15PM (#41133711)
Huhhh? Have you ever worked at a large enough company where stakeholder interests are not aligned?
Re:Russ Cox is stepping down as the Go tech lead by IshKebab on Thursday August 01, 2024 @05:35PM (#41133894)
That's private drama. For all we know there has been loads, but it's private so you can't see it.
Re:Russ Cox is stepping down as the Go tech lead by ncruces on Thursday August 01, 2024 @07:04PM (#41134559)
Where would you expect to see this drama unfold if it were private? Nowhere? That'd be incredible opsec.

Code review happens in public, not on GitHub but on Gerrit. The main issue tracker is public, on GitHub. Proposals are largely handled on the issue tracker. There are public mailing lists, etc.

Surely, there are face to face private meetings. And there are likely also private issue trackers, mailing lists, and etc. And, yes, sometimes, a seemingly arbitrary decision pops up, that was clearly discussed elsewhere.

But these comments seem to come from people who never even tried to contribute, or deal with the process.

I've done docs fixes as a total newb, had to convince the Windows maintainer to let me fix a Windows issue (that a year later produced flaky tests, which I fixed), made and got a proposal accepted, have a project in the linkname hall-of-shame, which led to a successful proposal to open up APIs (which then failed tests on some platforms, which I fixed).

All with little drama, pure engineering.

Re:Russ Cox is stepping down as the Go tech lead by Maxatar on Thursday August 01, 2024 @05:49PM (#41134006)
Getting paid has nothing to do with drama. Plenty of high paid people get involved in drama and infighting across all walks of life including tech.
Re:Russ Cox is stepping down as the Go tech lead by segfaltnh on Thursday August 01, 2024 @11:17PM (#41135808)
Pretty sure Musk gets a decent paycheck, and manages to be involved in plenty of drama.
Re:Russ Cox is stepping down as the Go tech lead by sangnoir on Thursday August 01, 2024 @05:20PM (#41133758)
And yet we've had lots of drama in Linux and Redhat mailing lists, involving people paid to work on the respective projects, and using their work email.
Re:Russ Cox is stepping down as the Go tech lead by goalonetwo on Thursday August 01, 2024 @05:29PM (#41133834)
I would rather say that it is easy to have zero drama when most of the committers come from a single large companies.
Re:Russ Cox is stepping down as the Go tech lead by ein0p on Thursday August 01, 2024 @05:20PM (#41133752)
That’s unfair. There’s plenty of drama in projects with all sorts of funding situations. Look at eg Rust. Lots of drama and it’s anyone’s guess if the code you wrote a year ago would work today.
Re:Russ Cox is stepping down as the Go tech lead by lkirkwood on Thursday August 01, 2024 @05:39PM (#41133929)
> It's anyone's guess if the code you wrote a year ago would work today

Is that true? In what sense? I was under the impression the editions took care of that.

Re:Russ Cox is stepping down as the Go tech lead by seeekr on Thursday August 01, 2024 @05:49PM (#41134004)
Not true, not sure why GP said that. Been writing Rust for many years and code does not just break on compiler upgrades. Super stable overall, including the wonderfully evolving ecosystem!
Re:Russ Cox is stepping down as the Go tech lead by Onavo on Thursday August 01, 2024 @09:13PM (#41135262)
They are the programming language equivalent of GitHub repos that maintain a low open issue count by closing most issues as "won't fix" or "won't build".
Re:Russ Cox is stepping down as the Go tech lead by segfaltnh on Thursday August 01, 2024 @11:16PM (#41135805)
Yep. It takes a lot of bravery and I appreciate it!
Re:Russ Cox is stepping down as the Go tech lead by ein0p on Thursday August 01, 2024 @10:34PM (#41135634)
Good
Re:Russ Cox is stepping down as the Go tech lead by lolinder on Thursday August 01, 2024 @09:37PM (#41135380)
Yes. And?

Programming languages more than almost any other type of project end up swamped with thousands of competing requests to implement mutually incompatible features. Some languages do better than others at saying no, and those languages tend to be the ones that achieve widespread adoption.

Re:Russ Cox is stepping down as the Go tech lead by pansa2 on Friday August 02, 2024 @12:03AM (#41136008)
> Some languages do better than others at saying no, and those languages tend to be the ones that achieve widespread adoption.

Unfortunately that’s not at all true - Go is a real outlier here. If it were true, we’d all be writing C instead of C++, Lua instead of Python and ES5 instead of TypeScript.

Re:Russ Cox is stepping down as the Go tech lead by cookiengineer on Friday August 02, 2024 @02:28AM (#41136586)
The choice is yours. Don't blame your choices on other people's opinion that you don't agree with. Everything in life is a tradeoff.

If you don't agree with the available languages, make it better. That's the power of open source :)

Re:Russ Cox is stepping down as the Go tech lead by randomdata on Friday August 02, 2024 @03:25AM (#41136814)
> The choice is yours [pansa2].

Who gave him control over what sees widespread adoption?

Re:Russ Cox is stepping down as the Go tech lead by flohofwoe on Friday August 02, 2024 @02:40AM (#41136628)
FWIW I switched from C++ to C about 7 years ago and never looked back (can't quite escape C++ completely though because some important libraries are still written in C++ unfortunately). I vastly prefer TS to JS, Python and Lua though.
Re:Russ Cox is stepping down as the Go tech lead by pansa2 on Friday August 02, 2024 @04:01AM (#41136968)
> I switched from C++ to C about 7 years ago and never looked back

I'm definitely considering the same, and you're right - it's not C++ itself that appeals to me at all, it's the libraries. I'm not sure what C libraries I'd use for collections (instead of the STL and Abseil [0]), or in lieu of CLI11 [1] or Dear ImGui [2].

[0] https://abseil.io/about/design/swisstables

[1] https://github.com/CLIUtils/CLI11

[2] https://github.com/ocornut/imgui

Re:Russ Cox is stepping down as the Go tech lead by hsaliak on Friday August 02, 2024 @09:39AM (#41138733)
DearImgui’s coding style is a good compromise.
Re:Russ Cox is stepping down as the Go tech lead by truncate on Thursday August 01, 2024 @10:40PM (#41135659)
Couldn't agree more. Always felt community had trust in the team. Its not the fanciest language, but whatever they push for usually works. In contrast, recently I've had to deal with Swift, and they are often pushing like 10 features, but each of them is full of holes and annoyances. Great respect for doing the boring of keeping it stupid and simple.
Re:Russ Cox is stepping down as the Go tech lead by moogly on Friday August 02, 2024 @08:22AM (#41138246)
> almost zero drama

Hm. Wasn't (the lack of) generics pretty drama filled? Especially the way they fought against it for so long.

Re:Russ Cox is stepping down as the Go tech lead by quectophoton on Friday August 02, 2024 @11:53AM (#41139888)
s/fought against it/rejected superficial proposals that were mostly about syntax bikeshedding and didn't include enough research on how the proposal would play along with the rest of the language and ecosystem/
Re:Russ Cox is stepping down as the Go tech lead by tomcam on Friday August 02, 2024 @01:33AM (#41136351)
Your question answers itself. It's growing in popularity in every year and has apparently suffered exactly zero scandals or embarrassing gaffes of any kind. Just not fucking up is huge in making any serious enterprise successful and very, very difficult to achieve.
Re:Russ Cox is stepping down as the Go tech lead by treyd on Friday August 02, 2024 @01:45AM (#41136396)
Just from the top of my head there's the Google proxy shenanigans and the telemetry proposal that they backed down from. There may be others I'm not aware of.
Re:Russ Cox is stepping down as the Go tech lead by kjksf on Friday August 02, 2024 @11:03AM (#41139367)
Explain how Google proxy "shenanigans" are any different than "npm proxy shenanigans" or "cargo shenanigans" or "pip shenanigans". It's a service to improve Go ecosystem with anti-spoof security design (which can't be said about those other code download services).

telemetry design is actually very thoughtful, limited and reasonable about what and how much data it sends. Motivation for sending the data is clear (improving Go). It's only a scandal for unreasonable people.

Re:Russ Cox is stepping down as the Go tech lead by cookiengineer on Friday August 02, 2024 @02:34AM (#41136606)
The reluctancy to introduce new syntax too quickly (looking at you, TC39 and Babel) makes go an almost maintenance free language.

If you learned idiomatic go, you can maintain and patch other libraries in the ecosystem very quickly.

Unified codestyle, unified paradigms, unified toolchain.

It's a language with harsh opinions on everything. If you manage to get over your own opinions, you'll realize that any opinion upstream is better than no opinion downstream.

That's why go's toolchain isn't as messed up as npm, yarn, grunt, gulp, webpack, parcel, babel and other parts of the ecosystem that have no conventions and are therefore as a result very expensive to maintain.

Re:Russ Cox is stepping down as the Go tech lead by serial_dev on Friday August 02, 2024 @02:44AM (#41136650)
This!

In Go, a feature needs to have an extremely good reason to be added, and even then it's only added with care and caution.

In other languages, pointless features are added because maintainers are afraid, or not empowered to say... "yeah, we get it, but no, we will not add cruft to the language because you can't write your own 2 line function to achieve the same, no matter how hard you dunk on us on Twitter, it's take it or leave it, but you won't tell us how to run this project"

Re:Russ Cox is stepping down as the Go tech lead by pansa2 on Friday August 02, 2024 @04:39AM (#41137113)
> pointless features are added because maintainers are afraid

I wouldn't have described language designers' feelings that way, but you're absolutely right. For example, witness the recent features added to Python with little more justification than "other languages have it". It's pure FOMO - fear of missing out.

Re:Russ Cox is stepping down as the Go tech lead by vbsd on Friday August 02, 2024 @07:31AM (#41137933)
Would you expand on the Python issue? I find recent Python additions either useful or non-intrusive, I wonder which ones you think are born out of FOMO.
Re:Russ Cox is stepping down as the Go tech lead by pansa2 on Friday August 02, 2024 @08:08PM (#41143723)
The `match` statement is the most obvious - its motivation [0] is "pattern matching syntax is found in many languages" and "[it will] enable Python users to write cleaner, more readable code for [`if isinstance`]". But `if isinstance` is bad Python! [1]

`match` also breaks fundamental Python principles [2] and interacts badly with the language's lack of block scope:

    >>> a, b = 1, 2
    >>> match a:
    ...     case b: pass
    ...
    >>> a, b
    (1, 1)
`match` clearly doesn't fill a gap in a coherent design for Python. It seems to have been added due to a combination of FOMO and/or resume-driven development.

Another example is async-await - while the concept is fine (although I think stackful coroutines are a better fit for a high-level language), the syntax is just copy-pasted from other languages [3]. There seems to have been little thought as to why C# etc chose that syntax (to allow `async` and `await` to be contextual keywords), nor how `async def` contradicts existing Python syntax for generators.

[0] https://peps.python.org/pep-0635/#motivation

[1] http://canonical.org/%7Ekragen/isinstance/

[2] https://x.com/brandon_rhodes/status/1360226108399099909

[3] https://peps.python.org/pep-0492/#why-async-and-await-keywor...

Re:Russ Cox is stepping down as the Go tech lead by pansa2 on Saturday August 03, 2024 @10:54AM (#41146909)
Here's Guido himself expressing FOMO about what would happen if Python stopped continually accumulating new features (specifically including the `match` statement):

> Essentially the language would stop evolving. I worry that that would make Python become the next legacy language rather than the language that everyone wants to use.

https://discuss.python.org/t/pep-8012-frequently-asked-quest...

Re:Russ Cox is stepping down as the Go tech lead by Cthulhu_ on Friday August 02, 2024 @04:59AM (#41137185)
"Other languages have it" is a disease that's struck many languages in the past decade+, notably Javascript which added partial OOP support (classes but initially no access modifiers), or Java which added functional programming constructs via Streams.

I mean granted, Java needed some tweaks for developer ergonomics, and I'm glad they finally introduced value types for example, but I now find that adding entire paradigms to a language is a bad idea.

In the case of Go, yes it needed generics, but in practice people don't use generics that often, so thankfully it won't affect most people's codebases that much. But there's people advocating for adding more functional programming paradigms and syntax like a function shorthand, which is really frowned upon by others, because new syntax and paradigms adding to the things you need to know and understand when reading Go.

Plus at the moment / the way the language is designed, FP constructs do not have mechanical sympathy and are far slower than their iterative counterparts.

Re:Russ Cox is stepping down as the Go tech lead by diggan on Friday August 02, 2024 @05:15PM (#41142757)
Another example from another language: `class` added to JavaScript. Addition that was made to the language for something that already was possible, didn't add anything fundamentally new and added just because developers from other languages were more used to that particular syntax.
Re:Russ Cox is stepping down as the Go tech lead by klabb3 on Friday August 02, 2024 @06:15AM (#41137544)
Yes about the language but also Google understands that both tooling and standard library is more important than the language. All of that makes Google internal maintenance much much better. Another artifact of google3 was the absolute shitshow of GOPATH and abysmal dependency management – because Google didn’t really need it, while people outside suffered. When they added go mod support Go became 10x more productive outside of Google.

Go is almost an anti-language in that sense, reluctantly accepting shiny lang features only after they’ve been proven to address major pain points. It’s almost more an “infrastructure deployment toolkit” than a language. Which strangely makes it extremely pleasurable to work with, at least for network-centric applications.

Re:Russ Cox is stepping down as the Go tech lead by KronisLV on Friday August 02, 2024 @02:52AM (#41136689)
With it being so consistent and predictable, I wonder why it hasn’t displaced .NET and Java in the enterprise for back end development.

Maybe because a framework like ASP.NET or Spring that covers like 80+% of the enterprise needs hasn’t quite emerged? Or perhaps we just need to give it a decade or so.

There are still very few Go jobs in my country, most are either .NET, Java or PHP.

Re:Russ Cox is stepping down as the Go tech lead by trustno2 on Friday August 02, 2024 @03:25AM (#41136813)
Go doesn't really lend itself that much into code with a lot of abstraction layers. If you try to do that, you will start to run against the language.

The more enterprisey software usually have lots of layers for organizational reasons, and go doesn't really fit there. So I don't think it will really be a hit in the enterprise.

yes there are orm solutions and DI frameworks and all that, but they always feel like they don't belong in the language.

(Also, java and .net and php are much older and have much bigger enterprisey ecosystem.)

I have seen go replacing the php stack though, and in some way the "original" python stack - but python now has ML.

Re:Russ Cox is stepping down as the Go tech lead by jen20 on Friday August 02, 2024 @08:11AM (#41138183)
> usually have lots of layers for organizational reasons

The ridiculous number of layers in Java or C# are more of a skill and guidance issue than anything else. Older languages don’t always mean over-attempted-abstraction (think C, for example).

Re:Russ Cox is stepping down as the Go tech lead by pjmlp on Friday August 02, 2024 @09:17AM (#41138614)
Never seen CORBA and COM written in C, I guess.

Enterprise Architects will do their beloved architectures with whatever languages are the tool of the day.

Re:Russ Cox is stepping down as the Go tech lead by jen20 on Friday August 02, 2024 @07:25PM (#41143509)
Ohhhh boy have I seen that. Like I say, it’s a skill issue, but those people tend to be in Java and C#, not Go and Rust.
Re:Russ Cox is stepping down as the Go tech lead by pjmlp on Saturday August 03, 2024 @03:18AM (#41145154)
Go has Kubernetes ecosystem for that, and Rust is yet to take off as application programming language embraced by Enterprise Architects at big corp.
Re:Russ Cox is stepping down as the Go tech lead by jen20 on Sunday August 04, 2024 @07:40AM (#41152871)
The Kubernetes code base isn’t great, but the notion that the ecosystem is even nearly as complex as the average EA monstrosity implementing basic forms over data as multi-player Microsoft Access is fanciful at best.
Re:Russ Cox is stepping down as the Go tech lead by trustno2 on Friday August 02, 2024 @09:34AM (#41138699)
I have worked in enterprises and the layers are usually an organizational issue that just acts as code issue.

Structure of code often reflects structure of your company.

The code is often maze of layers because the company is a maze of sub-committees. Java/C# fits more neatly in there.

Although with Go, what can happen is that there is a maze of microservices. Maybe that's not that much better.

Re:Russ Cox is stepping down as the Go tech lead by cookiengineer on Friday August 02, 2024 @03:07AM (#41136752)
> ASP.NET or Spring

(Disclaimer: I don't agree with HTMX rendering HTML chunks on the backend side, and I think that APIs should be HTTP-cacheable and use REST/JSON)

Currently I am trying to get better at using Go with WebAssembly for the frontend. I love to use the webview/webview bindings to build local GUIs, but the need for redundant code in JavaScript for client data transfers and input data validation are annoying me a bit much.

I am trying to find out a paradigm that could benefit from the strength of JSON marshalling, with the idea that you can map routes to structs, for example, and where a unified "Validate() (bool, error)" method as an interface is enough to use the same structs on both the frontend and backend, for both serialization and validation/sanitization.

Having said that, I think that what's missing the most in go right now is a good UI framework for the web, but it's hard to find a paradigm that fits nicely into the language while also being able to handle dynamic data/refreshes/render loops without getting too bloated too quickly.

Re:Russ Cox is stepping down as the Go tech lead by wordofx on Friday August 02, 2024 @03:31AM (#41136843)
> and I think that APIs should be HTTP-cacheable

Rendering html on the server does not make it not cacheable.

The vast majority of people do not need graphql or shift their compute to the client with a junk react app with adhoc json endpoints everywhere.

Re:Russ Cox is stepping down as the Go tech lead by KronisLV on Friday August 02, 2024 @04:42AM (#41137132)
I think server side rendering can often be pretty comfortable to use!

That said, I’ve also worked with JSF and PrimeFaces project and the ones I’ve seen have been more burdensome from a maintenance perspective and also more buggy than most SPAs that I’ve worked with.

I’ve also seen large monoliths where the tight coupling slows updates down a whole bunch, as opposed to the presentation being in a SPA that’s separate from an API that can be more limited in its scope (nothing wrong with using ASP.NET and Spring for just an API).

Heck, I’ve migrated a SPA from the now defunct AngularJS to Vue and it felt better than having a legacy project that’s stuck on an old version of Spring and PrimeFaces because there’s so many moving parts that when you try to update anything, everything breaks.

Plus, turning a SPA into a PWA is a fairly pleasant experience. I don’t think most folks need GraphQL though, especially when we can barely do RESTful API correctly and not even all places use OpenAPI specs and tooling, making client code impossible to generate (even SOAP did a better job in that particular regard with how widespread WSDL was).

Re:Russ Cox is stepping down as the Go tech lead by Philip-J-Fry on Friday August 02, 2024 @03:37AM (#41136872)
Go is displacing .NET where I work for backend development. We still use .NET for Windows GUIs but any sort of server code is mostly Go going forward.
Re:Russ Cox is stepping down as the Go tech lead by Cthulhu_ on Friday August 02, 2024 @05:02AM (#41137201)
It's not yet an enterprise language; along the languages/frameworks, there's a huge ecosystem of QA, monitoring, security, etc solutions in the Java/.NET space that just isn't there in Go.

I mean there's a slow shift, I keep hearing of "rewriting a Java codebase to Go", but it'll be a slow process. And especially the bigger projects that represent 30 years of Java development will and should be reluctant to start rewriting things.

Re:Russ Cox is stepping down as the Go tech lead by lifty on Friday August 02, 2024 @06:34AM (#41137625)
In my enterprise neck of the woods Go is steadily taking over backend development.
Re:Russ Cox is stepping down as the Go tech lead by pjmlp on Friday August 02, 2024 @09:18AM (#41138620)
Thankfully, it is enough that it is a must in DevOps space.
Re:Russ Cox is stepping down as the Go tech lead by _the_inflator on Friday August 02, 2024 @04:18AM (#41137039)
Clutter death that creeps in any language, as I see it. To this day, only a small subset of JS syntax is used; I cannot recall anyone besides me ever using method chaining like .map .filter, etc.

There is a reason why almost every good language is somewhat akin to C to this day, and maybe people started over to get rid of the noise.

Re:Russ Cox is stepping down as the Go tech lead by jessekv on Friday August 02, 2024 @08:03AM (#41138138)
Haha interesting. I actually like .map/.filter/.find/etc. in JS and comprehensions in Python. I find they communicate the intent of the programmer really clearly as compared to a for-loop.
Re:Russ Cox is stepping down as the Go tech lead by matwood on Friday August 02, 2024 @08:59AM (#41138503)
> I cannot recall anyone besides me ever using method chaining like .map .filter, etc.

Interesting. That's all anyone on my team ever used once it became available.

But, it highlights the point with Go. Working with Go for just a little while means I can easily read and work with nearly any Go project with a very short ramp up.

Re:Russ Cox is stepping down as the Go tech lead by lopkeny12ko on Friday August 02, 2024 @04:32AM (#41137084)
> Unified codestyle

The moment I got my first compile error due to an unused variable and an unused import, made me realize Go is not a serious programming language.

Re:Russ Cox is stepping down as the Go tech lead by lioeters on Friday August 02, 2024 @07:26AM (#41137907)
The moment you see that you had misspelled a variable name by a single character when the compiler warned you about an unused variable, you'll realize Go is a serious programming language.
Re:Russ Cox is stepping down as the Go tech lead by biomcgary on Friday August 02, 2024 @02:44PM (#41141447)
This has saved me minutes of confusion so many times.
Re:Russ Cox is stepping down as the Go tech lead by Cthulhu_ on Friday August 02, 2024 @05:03AM (#41137208)
I wonder who hurt them, that is, how much did unused variables/imports hurt at Google for them to make those a compiler error?

Insofar I know it, I can imagine C/C++ caused some issues like that because it's hard to figure out whether an import is used, but an unused import does have a cost.

Re:Russ Cox is stepping down as the Go tech lead by foldr on Friday August 02, 2024 @08:02AM (#41138131)
I think the fundamental reason behind this behavior is just Go's rejection of the concept of compiler warnings. Unused variables must either be A-ok or trigger an error. They chose the second option for unused variables. Some other code smells are considered A-ok by the compiler and need to be caught by linters.
Re:Russ Cox is stepping down as the Go tech lead by jen20 on Friday August 02, 2024 @08:13AM (#41138196)
The problem with such rejection is that every serious project written in Go has invented compiler warnings outside the compiler, with linters.
Re:Russ Cox is stepping down as the Go tech lead by foldr on Friday August 02, 2024 @09:49AM (#41138794)
Is this a problem? Linters are also used with lots of languages that do have compiler warnings. Go just removes the no man’s land between honest-to-goodness compiler errors and linter warnings about code smells. I see no issue with having the latter handled entirely by tools designed for the job.
Re:Russ Cox is stepping down as the Go tech lead by kjksf on Friday August 02, 2024 @10:57AM (#41139298)
Why is it a problem?

`go vet` is part of Go toolchain so the designers very much understand and acknowledge that code can have issues that are not always errors.

The distinction they made is very simple: an error is something that is always wrong and a vet warnings is something that is possibly wrong but not always.

They made a judgement call to split the responsibility: compiler only reports errors, other tools, including `go vet`, can tell you about other issues.

For example: passing a large struct by value to a function is potentially a performance problem but it's also correct code.

If you ever tried to compile C++ code with different compilers you would know why it's a wise decision.

The set of warnings is vast and not standardized so you take C++ source from project. It compiles for them but doesn't compile for you because you use different compiler or enabled different set of warnings. At which point you either try to get the other project to "fix" something that isn't an issue for them or you do stupid, pointless, time consuming work adjusting your build system.

The same would happen in Go and it would be a reusability killer. You use some library in your program but it doesn't compile because you decided to use more strict set of flags.

Lack of warnings switches also simplifies the toolchain. In go it's just `go build` and it works.

In C++ you have to write some kind of makefile because everyone executes `cc` with different set of flags.

Re:Russ Cox is stepping down as the Go tech lead by rsc on Friday August 02, 2024 @01:44PM (#41140909)
https://research.swtch.com/deps#watch_your_dependencies

> Creeping dependencies can also affect the size of your project. During the development of Google’s Sawzall—a JIT’ed logs processing language—the authors discovered at various times that the main interpreter binary contained not just Sawzall’s JIT but also (unused) PostScript, Python, and JavaScript interpreters. Each time, the culprit turned out to be unused dependencies declared by some library Sawzall did depend on, combined with the fact that Google’s build system eliminated any manual effort needed to start using a new dependency.. This kind of error is the reason that the Go language makes importing an unused package a compile-time error.

Re:Russ Cox is stepping down as the Go tech lead by tommica on Friday August 02, 2024 @04:37AM (#41137107)
Why not? Pretty sure it's used in a lot of places, so it does seem quite serious if a language.
Re:Russ Cox is stepping down as the Go tech lead by classified on Friday August 02, 2024 @08:21AM (#41138239)
Well, if you compare against the absolute bottom of the barrel, it's not too hard to look good.
Re:Russ Cox is stepping down as the Go tech lead by daghamm on Friday August 02, 2024 @10:56AM (#41139291)
"That's why go's toolchain isn't as messed up as npm, yarn, grunt, ..."

And let's be honest, Rust toolchain is pretty messed up too.

Want to cross-compile with go? Set the GOOS variable and you are done. On Rust you need to curl-sh rustup, switch to nightly, add new targets, add target to your cargo and cross fingers it works this week.

Re:Russ Cox is stepping down as the Go tech lead by quectophoton on Friday August 02, 2024 @11:39AM (#41139773)
To be fair, with Go it's still painful to work with private repositories. And I'm invoking Cunningham's Law here when I say there's no convenient way to do so.

If you want to use a private repository (let's say it's a private GitHub repository), then you either have to do it the bad way (setting up your own GOPROXY and setting it up securely, which implies also ensuring it's not leaking your source code elsewhere for "analytics purposes"), or the worse way (doing brittle text replacement using weird git config stuff).

Or the annoying way of using a vanity import, and host that package in your domain with HTTPS using a wildcard certificate. But that would require either (1) only allowing access through WireGuard and hoping whatever reverse proxy you use has a plugin for your DNS registry; or (2) letting your VPS provider terminate DNS (e.g. Hetzner load balancer), but filter by IP address in your VPS firewall settings ensuring your public address (IPV4 /32 or IPV6 /64) is always up-to-date in the firewall.

Or using `replace` in `go.mod`, but these don't work transitively so these only work on "root" projects (i.e. they are ignored in dependencies), so I don't think this really counts as a solution.

I would have liked some way to force SSH access for a specific package, instead of HTTPS. Like for example `go.mod` supporting a `require-private` to use instead of `require` (or whatever similarly convenient directive for `go.mod` that implies authenticated SSH access is required).

Or in other words, say I have a package `github.com/_company/project`, and it depends on `github.com/_company/dependency`. I want to be able to do:

    git clone '[email protected]:_company/project.git' 'project'
    cd 'project'
    go mod tidy  # Should just work.
`go mod tidy` should just work without complaining about `github.com/_company/dependency` not existing (because it's a private repository only accessible through SSH).

(EDIT: Still, I'm agreeing with the point that Go's tooling is better than most other things I've tried. My only complains are this one about being inconvenient to use private repositories, and also that by default it leaks package names to Google whenever you do `go mod tidy`.)

Re:Russ Cox is stepping down as the Go tech lead by hop_n_bop on Friday August 02, 2024 @12:43PM (#41140373)
1) git config --global url.ssh://[email protected]/.insteadOf https://github.com/

2) export GOPRIVATE='github.com/_company/*'

Re:Russ Cox is stepping down as the Go tech lead by quectophoton on Friday August 02, 2024 @01:45PM (#41140925)
>> or the worse way (doing brittle text replacement using weird git config stuff).
Re:Russ Cox is stepping down as the Go tech lead by sapiogram on Friday August 02, 2024 @04:05PM (#41142138)
Rust cross-compilation isn't great, but this seems a bit hyperbolic:

> On Rust you need to curl-sh rustup

Yes, but you do that once per computer, probably when you installed the compiler

> switch to nightly,

No

> add new targets,

Fair. But this is also one-time setup.

>add target to your cargo

Not sure what you're talking about here tbh

> and cross fingers it works this week.

Don't use the nightly compiler and you're good

Re:Russ Cox is stepping down as the Go tech lead by daghamm on Saturday August 03, 2024 @07:58AM (#41146101)
If you are doing embedded work, which is where you often do cross-compiling, you still need nightly.

But that's a whole different can of worms.

Re:Russ Cox is stepping down as the Go tech lead by ycombinatrix on Saturday August 03, 2024 @07:39PM (#41150105)
Still 100x better than cross-compiling C
Re:Russ Cox is stepping down as the Go tech lead by tentacleuno on Friday August 02, 2024 @02:49PM (#41141495)
> The reluctancy to introduce new syntax too quickly (looking at you, TC39 and Babel) makes go an almost maintenance free language.

Could you provide some examples of this? From knowledge of the pipeline operator proposal[0], moving fast and breaking things isn't always a priority.

It goes without saying that Babel is an external collection of modules that don't fall under the TC39 umbrella, so they're able to iterate at a much greater cadence than the official specification (and you obviously need to explicitly opt-into using it.)

[0]: https://github.com/tc39/proposal-pipeline-operator/commit/da... (first commit; Nov 9, 2015, which is 8 years, 8 months, 24 days ago)