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

Yep in the same way it would allow `var u userID = 1` it allows `Work(1)` rather than insisting on `var u userID = userID(1)` and `Work(userID(1))`.

I teach Go a few times a year, and this comes up a few times a year. I've not got a good answer why this is consistent with such an otherwise-explicit language.



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

Search: