Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
452 views
in Technique[技术] by (71.8m points)

language agnostic - Why is reflection called reflection instead of introspection?

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 process of self-examination.

Reflection:

  1. the act of reflecting or the state of being reflected.
  2. an image; representation; counterpart
  3. a fixing of the thoughts on something; careful consideration
  4. a thought occurring in consideration or meditation.
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

There is an interesting answer on the french wikipedia article for Reflection (here)

Reflection can be decomposed in two parts:

  • introspection: a program can examine itself.
  • intercession: a program can modify its state/meaning.

So reflection is a 'stronger' property than introspection. That's why you say type introspection for the ability to know types at runtime (and changing them is another action: conversion/casting).

EDIT: actually I just realized the first answer was saying exactly that ^^. Time to unplug myself...


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...