4 ms·
The Go standard library makes use of a number of “optional interfaces”, which it uses to detect when a type implements a higher level action in a more efficient
by glenjamin 2y ago
The Go standard library makes use of a number of “optional interfaces”, which it uses to detect when a type implements a higher level action in a more efficient or specific way
This can be thought of as duck typing.
Examples can be found here: https://blog.merovius.de/posts/2017-07-30-the-trouble-with-optional-interfaces/ https://blog.merovius.de/posts/2017-07-30-the-trouble-with-o...