Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Your complaint is a bit knee-jerk. Aside from the conventional "i is for index", the only one letter identifiers in TFA are the method receivers. It is idiomatic Go to use a single-character variable as the receiver for a method, ala:

    type MyStruct struct {
        wobbly int
    }

    func (m *MyStruct) IsReallyWobbly() bool {
        return m.wobbly > 42
    }
So far, I've found this convention to be straightforward to work with, and there's little reason I can see to make the receiver identifier more elaborate. Especially in light of popular languages that omit a "self" identifier entirely.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: