3 ms·
Sooo... you bring up something I could use some "learn me somes" on... golang. Recently, in my personal life when choosing a "next language" to learn I chose Ru
by rubyn00bie 6y ago
Sooo... you bring up something I could use some "learn me somes" on... golang. Recently, in my personal life when choosing a "next language" to learn I chose Rust over Go because it seemed to offer everything Go does, and then some (like them systems level programmings). However, at my current employer, Go has a solid following and I'm unlikely to sell Rust (or even want to[1]): could you please speak to that real-world efficacy or what things you think it does superbly well to enable software like this?
I tried briefly to find some guides on go over the weekend, but an awful amount of them are targeted to using "X web framework," which seems utterly worthless (or boring) to me. I guess, to your point, I could go read through the Caddy source code and see what I find since this seems like a nice and useful application using Go.
[1]: There's almost no reason to sell a team on any new technology if there isn't a substantial gain from it. For the org I am at, I don't believe, Rust offers much over Go for most of the use cases. Sure, it certainly can be _faster_ but who fucking cares? Most of what we do isn't bound by machine time, it's bound by developer time. Thus, I seek to learn me some golang and what virtues it offers.
- lenkite 6y agoGo is excellent for writing CLI's and network services since it comes with built-in cross-platform sockets, HTTP, easy-concurrency, crypto, SSL and a comprehensive standard library. You don't need an overarching framework. You can pick and choose helper libs if you really need them. Doing the same in something like C++ or Java is a headache simply because the standard library is not sufficient and you waste valuable time in framework and library decision making. I learnt golang through books. The traditional GOPL, and OReilly's "Concurrency in Go". "Go Programming Blueprints 2nd Edition" shows how to implement several projects using (mostly) the Go standard library. (Sometimes developer time is not always the top most consideration though. There is one internal service that we refactored from Python -> Golang -> C++ for low-latency and low-memory performance.) Not tried Rust yet.
- asdkhadsj 6y ago> For the org I am at, I don't believe, Rust offers much over Go for most of the use cases. Sure, it certainly can be _faster_ but who fucking cares? That's actually not at all why I use Rust. I switched because I prefer the code locality. After ~5 years professionally with Go, I found large code bases were a pain point with Go because I never felt I had robust ways to solve problems, and instead always resolved to helper funcs. In Go it ended up being a ton of loops and helper functions. Spreading out the logic all over the damn place. Go is still a great language, I'm not knocking it. I just don't think speed is a selling point for Rust, honestly. Memory control is. Enums and pattern matching is. Iterators are (my favorite thing about Rust). Go could go a long way just having iterators.