因为之前一直以C++为主要开发语言,所以刚接触go语言中的reflect时感觉很懵逼,因此决定找资料彻底学习一下. 到底反射是什么? https://blog.golang.org/laws-of-reflection 根据这篇文章中的介绍: Reflection in computing is the ability of a program to examine its own structure, particularly through types; it's a form of met…
什么是反射 官方关于反射定义: Reflection in computing is the ability of a program to examine its own structure, particularly through types; it's a form of metaprogramming. It's also a great source of confusion. (在计算机领域,反射是一种让程序--主要是通过类型--理解其自身结构的一种能力.它是元编程的组成之一,同时…