Hacker News new | past | comments | ask | show | jobs | submit login

Thanks for the example.

Playing with the example a little bit left me with a nice feeling about Go's structural typing:

- Passing a ReaderCloser reference to a function that expects a Reader is possible: http://play.golang.org/p/PZCKvmp5Sj

- Composing interfaces, though very useful, is not required in order to make one a proper subtype of the other: http://play.golang.org/p/fXn0zzM60D




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

Search: