this post was submitted on 24 Nov 2023
7 points (100.0% liked)

Go programming language discussion

1382 readers
1 users here now

founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[โ€“] squirmy_wormy@lemmy.world 6 points 11 months ago (1 children)

This says when it's ok to use them and why it should be limited

https://go.dev/tour/basics/7

Personally, I don't like them. Makes things awkward to read imo

[โ€“] ck_@discuss.tchncs.de 4 points 11 months ago

Yeah, I tend to agree, naked returns are hard to read and they don't really add much in terms of value.

I avoid them in my code.