top | item 45198184

(no title)

roblh | 5 months ago

Elixir is spectacular for visualizing, it’s all just changing the shape of your data all the way down, and all the standard modules have exactly the right tools for doing whatever step needs to come next. It’s so easy to find yourself zoned in. Go has the rhythm of error handling everything, it feels like you’re steadily plodding along with these mini checkpoints.

discuss

order

gchamonlive|5 months ago

Yeah, if not for these checkpoints I think I'd have a much more fluid experience with golang, but I respect the fact they didn't choose to implicitly send errors through the callstack, I just never managed to find a good solution for making these callstacks clear.

Take this function I contributed not long ago to the project I work on: https://gitlab.com/nunet/device-management-service/-/blob/aa...

In it for each step in the procedure of saving the config file I need to check whether it's successful, otherwise send back the callstack. I often find it confusing to navigate back when I have an error and to maintain code that has many such steps.