--
You received this message because you are subscribed to a topic in the Google Groups "golang-nuts" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-nuts/dwSPKq9YDso/unsubscribe.
To unsubscribe from this group and all its topics, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
var rw io.ReadWriter = x
r := rw.(io.Reader) // bad, since we already know that rw is an io.Reader also (let's avoid runtime work)
var rw io.ReadWriter = x
r := io.Reader(rw) // okay -- using explicit conversion which the compiler will verify
var rw io.ReadWriter = x
var r io.Reader = rw // also okay -- using assignability rules which the compiler will verify
The Wikipedia sentence is not encyclopedic with regard to BCPL, B, C, C++ casts through pointers.
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.