On Sat, Mar 4, 2023 at 5:49 PM Lenny <developer.lenn...@gmail.com> wrote:
> The effective go documentation doesn't really go into detail of whether or > not I should try to name my variables as short as possible even though that > is discouraged because of readability Lookup "bike shedding <https://en.wikipedia.org/wiki/Law_of_triviality>". Whether a very short variable name (e.g., "i") or very long name (e.g., "CurrentIndex") is appropriate depends on context. And that context is not just a particular language feature (e.g., a "range" loop in Go) but also the idioms employed by a particular project. Whether a particular name maximizes readability depends on the context -- not the number of characters in the name. -- Kurtis Rader Caretaker of the exceptional canines Junior and Hank -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CABx2%3DD8AhPchtcY44g9sHzNSmz3t0%3DR8gokCP0sQYwAkA5iRiw%40mail.gmail.com.