-
> People tend to forget that Golang was created on purpose for poor programmers.
Nobody is forgetting that quote. Trust me, it has been repeated a lot[1].
That said, I think this framing of the issue really needs to die. Rob Pike is saying they're "not researchers", that they're "typically fairly young", not that they're poor programmers. Notice that in the list of languages they may have learned, "C or C++" is present. The idea is not that Go is designed for people who can't possibly write C++.
This framing also implies that the language being better for n00bs means that it's also necessarily worse for everyone else. There are some tradeoffs where this is a defensible position, but I think on the whole it's just not generally true. A good example is preferring composition over inheritance: I think the former is generally more understandable and a lot of people actually contort C++ to use it this way too. (For example, in some codebases, only pure abstract base classes are ever inherited; everything else is final.)
When I see this quote repeated as if it implies that Go is just generally designed for bad programmers, I feel like it reads like flamebait. The real answer is that it was designed to be so easy that any idiot can use it. Or in other words, Go is very grug-brained[2].
To each their own, but it's been over 10 years since that quote and Go has evolved a lot. Is it perhaps time to put it to rest and stop reading into it so much?
[1]: https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu... - though I'm sure it has been paraphrased and linked even more than this.
[2]: https://grugbrain.dev/
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
As a regular Go user, I agree with this take. Though the tools exist, error wrapping and checking (with errors.Is and so on) is actually pretty rare in my experience.
Positive example of good and appropriate usage here: https://github.com/coder/websocket/blob/master/internal/exam...
-
-
I think Inko (https://inko-lang.org/) has the potential to be that language with some tooling/adoption/maturation
-
To be pedantic for a moment...
> You can't use Go to write a kernel ...
Not a production kernel, but MIT did use Go to "study the performance trade-offs of using a high-level language with garbage collection to implement a kernel" [1]
There is also gVisor [2] which implements, as best as I can describe, a kernel in user space. It's intent is to intercept syscalls made in containers and to redirect its execution in a sandbox.
> ... program a microcontroller ...
I'm not sure if one would classify this as a microcontroller, but USB Armory did write a, iirc, Go compliant runtime for bare metal ARM and RISC-V [3]
[1] https://github.com/mit-pdos/biscuit
[2] https://gvisor.dev/
[3] https://github.com/usbarmory/tamago
-
To be pedantic for a moment...
> You can't use Go to write a kernel ...
Not a production kernel, but MIT did use Go to "study the performance trade-offs of using a high-level language with garbage collection to implement a kernel" [1]
There is also gVisor [2] which implements, as best as I can describe, a kernel in user space. It's intent is to intercept syscalls made in containers and to redirect its execution in a sandbox.
> ... program a microcontroller ...
I'm not sure if one would classify this as a microcontroller, but USB Armory did write a, iirc, Go compliant runtime for bare metal ARM and RISC-V [3]
[1] https://github.com/mit-pdos/biscuit
[2] https://gvisor.dev/
[3] https://github.com/usbarmory/tamago
-
> Do you have a pydantic equivalent in go?
I've been working on one [1].
But gosh, does go make it hard.
[1] https://github.com/pasqal-io/godasse
-
the most basic example was the declined proposal https://github.com/golang/proposal/blob/master/design/32437-...
Some people didn't like the "try" keyword it reminded them too much of exceptions, some people didn't like that they couldnt see a return inline (which was the purpose of the proposal in the first place).
it's not that there are no solutions. the main problem is the go team's insistence to have "one true way" (tm) of doing something and unfortunately this gap between people who want to see every return inline and people who want to see the clean solution separate from the error handling is not something that can be bridged by technical means. the only solution is to implement both ways and lets see which one wins.
-
https://github.com/pkg/errors provides stack traces support. This unfortunately did not get included in the Go1.13 release when error wrapping was introduced.
-
This is a thing that's having work done, but still too large depending:
https://www.swift.org/documentation/articles/static-linux-ge...
See here for sizes of various languages as of August 2024 when I'm commenting (for Windows):
https://github.com/MichalStrehovsky/sizegame
Build actions here:
https://github.com/MichalStrehovsky/sizegame/blob/master/.gi...
See also embedded Swift:
"Apple explains that Embedded Swift is a subset of the Swift programming language with a much smaller footprint (the binary can be around 10KB..."
https://www.cnx-software.com/2024/06/13/embedded-swift-esp32...
-
nimskull
An in development statically typed systems programming language; with sustainability at its core. We, the community of users, maintain it.
Unfortunately, Nim's BDFL is... not known for playing well with others. Perhaps the Nimskull fork will grow into something widely useful?
https://github.com/nim-works/nimskull
-
The implicit argument is that there's some irreducible non-negotiable project complexity in real-world software, and the explicit argument in the post is that you can either put it into the language/compiler or keep it in wetware.
The supporting argument in the text is that even simple things like downloading a file can get hairy very fast. Networks are complex, HTTP, IPv4/v6, DNS - it's always DNS! - filesystems, permissions, running out of space, computer runs out of battery, etc.
Probably a better argument would be to focus only on application logic (type system, error handling, syntactic-semantic ergonomics) and show that a complex piece of Go [like the k8s persistent volume controller] can be written in a nicer, more maintainable, safer way in Rust.
Of course not all Go code achieves Kubernetes-level complexity. And I think it makes sense to pick the right tool for the job, which is whatever the team/programmer is productive with. (And here productivity is measured based on how well the resulting code/software solves the business case. And basically if there's no need for Rust-level safety/quality/maintainability, or if there's an explicit need for Go-level cheaper hackability, then that's a great result business-wise.)
The important corollary of this is that business requirements tend to change, yet software has inertia and that's roughly how we ended up with insert famously bad software that got wildly popular unexpectedly (for example Windows, Macromedia/Adobe Flash and the infamous plugin, random low-level crap in appliances, and adjacent to that the Bluetooth stack that got rewritten in Rust for Android).
So - of course - for society it would be amazing if software would be better from the start. (Duh!)
https://github.com/kubernetes/kubernetes/blob/60c4c2b2521fb4...
-
-
I believe what he wants, is the usual C trick of defining a struct which represents the wire format (with all the usual caveats). Then cast a char pointer to be an instance of a pointer to that struct. Sort of like this:
https://github.com/danos/vyatta-dataplane/blob/master/src/ecmp.c#L108-L116
-
vos
Vinix is an effort to write a modern, fast, and useful operating system in the V programming language
What is quite interesting (after looking at their documentation), is that V lang[1] has all that is mentioned: `?`[2], `or`[2], sum types[4], and can return multiple values[5].
[1]: https://vlang.io/
[2]: https://github.com/vlang/v/blob/master/doc/docs.md#optionres...
[3]: https://github.com/vlang/v/blob/master/doc/docs.md#sum-types
[4]: https://github.com/vlang/v/blob/master/doc/docs.md#returning...
-
v
Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. Supports automatic C => V translation. https://vlang.io
What is quite interesting (after looking at their documentation), is that V lang[1] has all that is mentioned: `?`[2], `or`[2], sum types[4], and can return multiple values[5].
[1]: https://vlang.io/
[2]: https://github.com/vlang/v/blob/master/doc/docs.md#optionres...
[3]: https://github.com/vlang/v/blob/master/doc/docs.md#sum-types
[4]: https://github.com/vlang/v/blob/master/doc/docs.md#returning...
Related posts
-
Good union types in Go would probably need types without a zero value
-
Banging Errors in Go
-
What is gained and lost with 63-bit integers? (2014)
-
No telemetry in the Rust compiler: metrics without betraying user privacy
-
What programming language should a non-programmer learn to have a stimulating, challenging, and fun experience? Forth? Haskell? Assembly?