Why is reflection called reflection instead of introspection?

前端 未结 6 1861
孤独总比滥情好
孤独总比滥情好 2020-12-04 16:16

What is the origin of the term reflection? It seems more like introspection. Why isn\'t it called that?

Introspection: A looking inward; specifically, the act or p

6条回答
  •  猫巷女王i
    2020-12-04 17:10

    The term reflection comes from Brian Cantwell Smith's 1982 PHD dissertation which can be found at http://publications.csail.mit.edu/lcs/pubs/pdf/MIT-LCS-TR-272.pdf

    What has come to be called reflection is often merely introspection, i.e., access to metadata. Smith's requirements for reflection included a causal connection from metadata back, and this is usually the missing component. One way to imagine reflection is access to implementation, and not merely the implementation of some new instance of a computation, but a computation's access to it's own implementation. Certainly Java's original reflection api was misnamed as it was not reflective in this sense.

提交回复
热议问题