Earlier quoted context omitted.
There's a lot of developers that misuse/shouldn't use any powerful feature. If the solution is to give them a nerfed language, then you also nerf it for the users that would use the feature well in productive, useful ways.
Yes, it’s a trade-off. In an organization with thousands of developers the right trade-off is likely different than an org with 20. What I don’t understand is why people insist on making Go like every other language that already does what that are looking for. You want a language with generics, purely functional blah blah blah, great there are tons of choices, use one of them. Why insist on reducing the diversity in…
Go 1.18
351–360 of 614 posts
Re: Go 1.18
#352Earlier quoted context omitted.
Problems are not generic. "I need a N-ary binary tree over arbitrary comparable types" is not a problem. Problems are expressed in terms of domain concepts that are unique to the problem space, the organization, the business need. Some _implementation details_ or maybe patterns that can be used to solve those problems may be generic. That's separate.
That’s true, a binary tree isn’t a problem, it’s a tool for solving a certain class of problems. Since you can’t build reusable tools in pre-generic Go, (and, to be honest, only a limited set of tools with Go’s new generic system), programmers are forced to reinvent half-baked ad-hoc solutions all over their code base. I once read an article about a C codebase that contained dozens (!) of specialized linked-list impl…
Re: Go 1.18
#353Earlier quoted context omitted.
What's do notation? I've used optionals in many languages, and this is the first I've heard of it. What else do you really need except map and... flatMap (aka `then` aka `and_then` aka `>>=` aka `bind`).
https://en.m.wikibooks.org/wiki/Haskell/do_notation rough analogy: `await` replaces `.then()`, do-notation replaces `.flatMap()`
Re: Go 1.18
#354Earlier quoted context omitted.
> All three of these things are subjective. Not really. They aren’t formally defined, but there’s pretty wide consensus even among Go detractors about these qualities. > At some sufficiently large number of people, you need to acknowledge that how they think isn't wrong, the language is. Not when there are plenty of people willing to think differently and reap the benefits.
lol...you even take criticism arrogantly. Impressive. It wasn't a personal attack, it was a statement of fact, but thanks for making my point even more clearly for me - not only in your response to that, but in your assertion that your opinion based on your experience is fact . Appreciated. Restated: You aren't arrogant because you disagree with me. You're arrogant because the things you say and the way you say them…
Re: Go 1.18
#355Earlier quoted context omitted.
None with the same performance characteristics, ease of use, and ecosystem size. I'm reasonably competent with Rust, but sometimes I don't want to bash my head against the borrow checker or litter my code with copy/clone. Go hits a nice sweet spot, my main quibbles are that there's no native iterators/comprehensions or sum types with compiler checked exhaustive matching. With generics we can get libraries that allow…
Ocaml. Insanely fast compiler. Great type system. Functional programming at its best but still relatively pragmatic and easy to mix in some imperative code if need be. It is a bit more complicated than Go and the ecosystem is maybe a bit more patchy but other than you will have a good time.
Re: Go 1.18
#356Earlier quoted context omitted.
None with the same performance characteristics, ease of use, and ecosystem size. I'm reasonably competent with Rust, but sometimes I don't want to bash my head against the borrow checker or litter my code with copy/clone. Go hits a nice sweet spot, my main quibbles are that there's no native iterators/comprehensions or sum types with compiler checked exhaustive matching. With generics we can get libraries that allow…
Rust isn't a functional programming language. You could try OCaml, it's kind of a halfway point between Go and Haskell.
Re: Go 1.18
#357Earlier quoted context omitted.
It seems like it does to me. Why doesn't it?
Because not all statements apply to all situations.
Re: Go 1.18
#358Earlier quoted context omitted.
I can never seem to understand why a GCed language has pointers, and makes you memorize when to use stack vs heap.
Hits the sweet spot for me between the one extreme of having to malloc/free everything myself and the other extreme where everything is immutable, garbage collected and you dont know what causes allocation. The former is a nightmare for security and productivity, the latter is a nightmare for performance.
Re: Go 1.18
#359Earlier quoted context omitted.
I have already started having trouble understanding open source code using generics. I can see the upsides of having generics, but have lost the enthusiasm with which I used to browse Go code. I am still a junior engineer, so maybe it will get better with time.
Every abstraction tool will get misused, especially early on. I bet the Go community will figure out how ways to mitigate that in the long run, given it’s culture around readability.
There was a lot of that back when Java and C# first got their generics.
Re: Go 1.18
#360My favorite feature is a tiny, couple line bug fix that I pushed hard to get included during the feature freeze. Full details here, but a summary is below: https://github.com/golang/go/issues/51127 For the past ~8 years, many hundreds of people reported on GitHub - and likely many multiples more have encountered and not reported - a program that didn't work with the error "cannot unmarshal DNS..." This error seems to…
I wish I had your time and effort to be able to fix the issues of split DNS in macOS being broken unless using cgo. https://github.com/golang/go/issues/12524 This has been an open issue since 2015. It's a pain because every single last tool using go cross compilation fails to use the proper DNS resolver and thereby doesn't work when using work VPN's. This is tools like: kubectl, vault, concourse (fly), and many other…