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

Can’t say I’ve ever had an issue with it, but it does get a bit wild when you have a function signature that takes a function and returns one, unless you clear it up with some types.

  func (s *Recv) foo(fn func(x any) err) func bar(y any) (*Recv, err)
As an exaggerated example. Easy to parse but not always easy to read at a glance.


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

Search: