![]() |
|
![]() |
| > Well, clearly there is a need for a special value that is not part of the set of legal values.
There's a neat trick available here: If you make zero an illegal value for the pointer itself, you can use zero as your "special value" for the std::optional wrapper, and the performance overhead goes away. This is exactly what Rust does, and as a result, Option<&T>, Option |
![]() |
| > If I can dream, all of this would be solved by 72-bit CPUs, which would be the same as 64-bit CPUs, but the upper 8 bits can be used for garbage collection tags, sentinel values, option types etc.
https://www.cl.cam.ac.uk/research/security/ctsrd/cheri/cheri... Address space is 64bit, pointers are 128bit, and encode the region the pointer is allowed to dereference. And there's a secret 129th bit that doesn't live in the address space that gets flipped if the pointer is overwritten (unless it's an explicit instruction for changing a pointer) |
![]() |
| Wow, that discussion is infuriating. I'm shocked that many people on there don't seem to understand the difference between compile time checks and runtime checks, or the very basics of type systems. |
![]() |
| Many people on here as well! :-) Reading the comments on this post is stepping into an alternative universe from the PL crowd I usually interact with. Very conservative. It's quite interesting. |
![]() |
| OP is just saying that you don't have to permit operations such as addition or incrementation on range types, in which case you don't need the corresponding type-level operations. |
![]() |
| Wow. I haven't followed Go for a while, thanks for that note.
Iterators are very nice addition, even with typical Go fashion of quite ugly syntax. |
![]() |
| :D
It looks you don't understand the change at all. The statement "since Go 1.22, you should try to specify a Go language version for every Go source file" is made officially, not by me. > You have a well-documented history of making incorrect claims about Go compiler and runtime behaviors, so this isn't surprising. The claim is totally baseless. All my opinions and articles are based on facts. If you have found ones which are incorrect or which are not based on facts, please let me know: https://x.com/zigo_101. |
![]() |
| 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. |
![]() |
| 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:
Not to mention that it also required large changes to the CPython implementation, including an entirely new parser(!) - which means other implementations may never support it [3]. Clearly `match` 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 [4]. 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://github.com/micropython/micropython/issues/8507 [4] https://peps.python.org/pep-0492/#why-async-and-await-keywor... |
![]() |
| 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:
`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`.) |
![]() |
| 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. |
![]() |
| Go has Kubernetes ecosystem for that, and Rust is yet to take off as application programming language embraced by Enterprise Architects at big corp. |
![]() |
| 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. |
![]() |
| > 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) |
![]() |
| 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. |
![]() |
| The problem with such rejection is that every serious project written in Go has invented compiler warnings outside the compiler, with linters. |
![]() |
| 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. |
![]() |
| 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. |
![]() |
| 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". |
![]() |
| 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. |
![]() |
| 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. |
![]() |
| > 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. |
![]() |
| 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! |
![]() |
| I did mean to ask: who "owns" Go for all practical purposes?
I suppose in theory it's some independent entity/commitee/whatever, but who pays the majority of the people working on it? Google? |
![]() |
| > Basically, the Go team is a bunch of old white dudes, which already means the project is poorly managed from the start
This seems like a broad generalization. Can you please elaborate? |
![]() |
| PHP is governed by an RFC process requiring a 2/3 majority vote of a couple dozen core devs. This has been the case for nearly 20 years now. Rasmus rarely even votes these days. |
![]() |
| > it's always been someone breaking something or something along those lines
Not only is this a complete lie, but God forbid there's a process in place to catch these things instead of verbally abusing your coworkers for making mistakes, which Linus has done himself. > Imagine every outburst you have is public and pointed to for years to come You may be surprised to learn that the rest of us don't talk to anyone like this. > but being hung up over a few incidents over a 30-year time period That's a great way to make it sound old but he actually gets angrier as time goes on. https://lkml.iu.edu/hypermail/linux/kernel/1510.3/02866.html |
![]() |
| Thank you guys from another fan! Go literally saved my career as a software dev: got burned out around 2014, tried Go as therapy and have been a happy gopher ever since :) |
![]() |
| Thanks for helping the OEIS site stay alive. I was absolutely delighted by it the first time I visited it, decades ago. Equally delighted when I visited recently and saw some “Russ Cox” contributed. |
![]() |
| Same sentiment as the above poster. I’ve been working with Go since 2014, after using many languages before, and none match the ease and efficiency of development for my work. Thank you so much! |
![]() |
| Incredible blog. I've said it on this site before, but his series on regular expressions is insanely high quality and the fact he just posted it there for all of us is a huge privilege. |
![]() |
| Huge news! I hope the new leadership remembers that keeping golang small and simple was its greatest strength. Adding generics was too much, and while I think there are some important small cases when it's valuable, in practice people are using it when they shouldn't. I'd also like to see less google control of the project.
I'm certainly thankful for golang as it made my https://github.com/purpleidea/mgmt/ project possible! Thanks Russ! |
![]() |
| I think Googles good will in recent years is the problem.
I think Rust is better divorced from Mozilla, and Go would be better if it was divorced a bit from Google for a lot of the same reasons. |
Thank you, rsc, for all your work. Development in Go has become much more enjoyable in these 12 years: race detector, standardized error wrapping, modules, generics, toolchain updates, and so on. And while there are still things to be desired (sum types, better enum/range types, immutability, and non-nilness in my personal wishlist), Go is still the most enjoyable ecosystem I've ever developed in.