Hacker News new | ask | show | jobs
by mountainriver 2146 days ago
> 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.

3 comments

> 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.

Yea I would agree, Rust is imperative with some functional concepts baked in like a lot of languages have.
>> 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.

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.
> 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?

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.

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
> why they had to even do this in the first place?

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