3 ms·
Yes, but it's a bit like Rust's `unsafe` in that reaching for it first is not a great practice. There's usually a better way. Using interface{} where you trul
by hellcow 5y ago
Yes, but it's a bit like Rust's `unsafe` in that reaching for it first is not a great practice. There's usually a better way.
Using interface{} where you truly don't know and can't predict the data being sent to you is mostly something that libraries (like encoding/json) have already handled, so I don't have to interact with it much directly.
I think generics are going to have the biggest impact in adding effortless type safety to all kinds of libraries, though.