News for hackers. Stuff that matters.
Re:Go vs. Rust: Writing a CLI Tool by mountainriver on Tuesday August 04, 2020 @08:23AM (#24049213)
> If you still feel that Go is simple to learn try to read some kubernetes code

The Go code in K8s is simple, the system of Kubernetes is complex

Rust isn’t about machismo, it’s about high performance computing. Try writing graphics or machine learning code in Go, it’s not about being tough it’s about having a tool that can actually do the job.

Re:Go vs. Rust: Writing a CLI Tool by cies on Tuesday August 04, 2020 @08:42AM (#24049336)
> it’s about high performance computing.

And zero runtime cost abstractions. And having a non-profit to shepherd the project (and thereby having a good chance that you may influence the project). And strong typesafety. And design by committee (see how async-await was "agreed" upon).

Also Rust is called a multi-paradigm prog lang in the article: I dont think so. Scala is. Rust is not. It brings as much FP features into the language without sacrificing its core paradigm: an imperative systems language.

Re:Go vs. Rust: Writing a CLI Tool by yahyaheee on Tuesday August 04, 2020 @09:51AM (#24049923)
Yea I would agree, Rust is imperative with some functional concepts baked in like a lot of languages have.
Re:Go vs. Rust: Writing a CLI Tool by malechimp on Tuesday August 04, 2020 @08:40AM (#24049321)
>> it’s about high performance computing.

Yes. That's what I said. So, advocating for Rust in a non-high-perf requirement project makes for extra effort/optimization where it is not needed. Speed of dev, correctness, ease of maintenance are needed though. Optimizing for the sexy rather than the needed is a textbook machismo attitude. Good for CV-builders and for ego maybe but it usually hurts the company and the maintainers down the road.

Re:Go vs. Rust: Writing a CLI Tool by yahyaheee on Tuesday August 04, 2020 @09:52AM (#24049935)
Yea agree, if your looking at it to just understand what writing a CLI in Rust is like, there are a lot of use cases in which a CLI can benefit from performance, but this isn't one of them and he doesn't call that out.
Re:Go vs. Rust: Writing a CLI Tool by harpratap on Tuesday August 04, 2020 @08:44AM (#24049342)
> The Go code in K8s is simple, the system of Kubernetes is complex

Can you link me to a doc which explains the runtime scheme type system of Kubernetes? Could never wrap my head around how that even works. And why they had to even do this in the first place?

Re:Go vs. Rust: Writing a CLI Tool by yahyaheee on Tuesday August 04, 2020 @09:50AM (#24049913)
This is the best I can find https://kubernetes.io/docs/reference/using-api/api-concepts/ there used to be a better doc on this but I can't seem to find it again.

Runtime scheme and the k8s machinery can be pretty awkward. Scheme is just a way of registering the available datatypes by group/version/kind so the client can look at any given object and figure out if it knows how to decode it.

Re:Go vs. Rust: Writing a CLI Tool by harpratap on Wednesday August 05, 2020 @02:02AM (#24057708)
This doesn't explain it at all, specially the ecosystem surrounding schemes - informers, cache clients and various other code generators for typed as well dynamic API clients
Re:Go vs. Rust: Writing a CLI Tool by majewsky on Tuesday August 04, 2020 @09:43AM (#24049851)
> why they had to even do this in the first place?

Because they wanted stuff like Watcher<T>, but Go does not have generics.