The error handling in Go is SO verbose. When reading my code (or even reviewing other people's code) in order to understand at a high level what is going on, I feel like I'm squinting through a mesh wire window.
Compare this example in Go:
city := c.Query("city")
latlong, err := getLatLong(city)
if err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
return
}
weather, err := getWeather(*latlong)
if err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
return
}
weatherDisplay, err := extractWeatherData(city, weather)
if err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
return
}
c.HTML(http.StatusOK, "weather.html", weatherDisplay)
To this code in Rust: let lat_long = fetch_lat_long(¶ms.city).await?;
let weather = fetch_weather(lat_long).await?;
let display = WeatherDisplay::new(params.city, weather);
Maybe on first glance the Rust code can seem alien (what is a `?` doing there, what is actually going on with `.await`, etc) but when you are writing a 100k line application in Rust, you learn the patterns and want to be able to see the domain application logic clearly. And yet, there's no hidden errors or exceptions. When this code fails, you will be able to clearly identify what happened and which line the error occurred on.Prototyping even small applications in Go is verbose. And worse still, error prone. It's easy to be lazy and not check for errors and oops 3 months in your code fails catastrophically.
I know a lot of people like Go on here but in my mind Go only makes sense as a replacement for Python (static compilation, better error handling than Python, faster etc). If you don't know exactly what you want to build, maybe it is faster to prototype it in Go? I still would reach for Rust in those instances but that's just me. For large applications there's no question in my mind that Rust is a better choice.
Edit:
people have pointed out that I'm not comparing the same thing, which is true, I apologize for the confusing. But even code where Go propagates the errors, it is much more verbose (and my point still stands)
err := db.Get(&latLong, "SELECT lat, long FROM cities WHERE name = $1", name)
if err == nil {
return latLong, nil
}
latLong, err = fetchLatLong(name)
if err != nil {
return nil, err
}
err = insertCity(db, name, *latLong)
if err != nil {
return nil, err
}
And this is extremely common. More discussion in the thread below.It turned out that a bitrate of 112 Kbps was completely transparent for me. In the meantime there were forum wars on whether or not 320 was sufficient or not.
The experience humbled me. I cannot hear anything near as much as the pros (apparently) can.
My takeaway from the experience was that the bitrate didn’t really matter above 128 Kbps AAC. This was me paying super close attention and trying to find flaws in the encoding, not actually listening to music. I periodically rerun the test in myself as I get better equipment (laptop DACs are quite good now, for example) and get similar results. Age will be a limiting factor soon as it takes my hearing.
I’m the complete opposite. I might be irritated if people made me relive a sore defeat too soon, but I love “stewing” in the victories.
If people ask me “amazing win man, how’d you do it?”, I’d revel in retelling the story, especially if I took a shot and was clever. “They all said my way wouldn’t work but I showed them”
Maybe the actual takeaway is to figure out what kind of feedback a child responds best to and use that most of the time. You know, paying attention to the kid.
I would also dispute “no natural disasters”. There are serious winter events in those regions (and crazy floods depending on where you are in the Midwest) that happen basically yearly.
I don’t think any part of the world is without significant tradeoffs, you just have to find the ones that matter to you.
I was terrified of swimming in open water so only joined the group for a deep dive once and my memories are mostly people talking and laughing on the boat, but I remember feeling crazy when people talked about air control. What do you mean I have to exhale into my mask at a certain depth? And I should inhale it back as I’m coming up? I need to take _too big_ of a breath on the surface so I can distribute it as the pressure increases?
With just a little coaching from Alexey’s mother and some encouragement from my family, a high school kid who couldn’t hold his breathe for much more than a minute spent almost 2 minutes underwater and dove to 19 meters on his first day.
I’m still terrified of deep water, but I gained a respect for the “weird” sports out there. It’s often a bunch of people just trying to have fun, and sometimes they turn out to be really, really good at what they do.
I am not going to try to have a surgery to make it happen.
There is nobody with no gender, there are rarities with natural double gender features, but strictly speaking, nature assigns a gender during early pregnancy.
All the ideas about gender changes occur to people later on and based on personal feelings/factors. The mind is something that develops by education and experience, not genetic urges as far I am aware.
If schools and parents would educate kids saying theres no such thing like gender and you get to choose and society lets the promoters of such go rampant, I imagine this would not lead to a net positive outcome.
It's impressive to see what the Neovim community has built — preconfigured setups like https://nvchad.com/ are especially wild. But it still feels like a huge amount of work, hoop jumping, and _fragility_ just to reach parity with VS Code/Helix/Zed, which are pretty great out of the box, and which were built to be used as rich development environments instead of extensible text editors.
I've spent months tweaking Neovim/Emacs configs in the past and I ultimately end up conceding that I'd rather spend that time hacking on projects instead of my editor config. I do feel the pull of these editors, though. I'd love to understand what those who stick with them are doing differently, other than perhaps being more susceptible to sunk cost fallacies. :-)
Most important to me when I started tinkering with him was the speed/feature tradeoff, and portability. I was working on 7 machines at one point doing pretty quick edits of config files and Python scripts, so launch speed and availability across different environments drive me to vim.
Now there are alternatives, but back in 2015 these were all in their infancy. And now I _know_ vim and it keep adding more features. The incremental cost of adding language server support is much less than the cost of learning how to move around VSCode, so my (neo)vim config keeps growing slowly but surely