Why is reflection called reflection instead of introspection?

前端 未结 6 1849
孤独总比滥情好
孤独总比滥情好 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 16:58

    Reflection comes from the idea of "self-examination, self-modification, and self-replication", reflecting on one's self for the purpose of change. In programming you use reflection to examine the structure of the program itself in the context of using it instead of just examining it. What you get back is a representation of the program that you can use to modify it, rather than the data on which it operates.

    More information can be found at the wikipedia article..

提交回复
热议问题