What’s the point of limiting .(type) evaluations to type switches?

Written by
Link to Post

https://www.reddit.com/r/golang/comments/boqj33/whats_the_point_of_limiting_type_evaluations_to/ by 

I know the Go feature set is very well thought out and I’m sure there’s a good reason for it, but I’m curious why I can’t do fmt.Println(x.(type))

submitted by /u/mosskin-woast
[link] [comments]

Article Tags:
· ·
Article Categories:

Leave a Reply