August 2019
Beginner to intermediate
798 pages
17h 2m
English
Without a doubt, reflection is a powerful Go feature. However, as with all tools, reflection should be used rationally for three main reasons. The first reason is that extensive use of reflection will make your programs hard to read and maintain. A potential solution to this problem is good documentation, but developers are famous for not having the time to write the required documentation.
The second reason is that the Go code that uses reflection will make your programs slower. Generally speaking, Go code that is made to work with a particular data type will always be faster than Go code that uses reflection to dynamically work with any Go data type. Additionally, such dynamic code will make it difficult ...
Read now
Unlock full access