How to get concrete object of a static method via mirror API?

自作多情 提交于 2019-12-05 05:35:51
Gilad Bracha

a. The current state of affairs is temporary. The plan is that the mirror API will wrap the arguments with mirrors for you.

b. The API may eventually support a getProperty method that will give you a Future on the function object. However, you will not get a Function object directly, so this won't really make any difference in this case.

c. The core idea is that the API fundamentally works on mirrors. To make it more usable, it should accept non-mirrors as input and wrap them in mirrors for you. It will always return mirrors, and in some cases return futures on these. This is so the API works the same for remote and local cases.

d. Resources for understanding mirrors:

  1. http://www.bracha.org/mirrors.pdf (academic paper, tough going)
  2. http://www.hpi.uni-potsdam.de/hirschfeld/events/past/media/100105_Bracha_2010_LinguisticReflectionViaMirrors_HPI.mp4 (a video, pre-Dart, discusses earlier Mirror systems)
  3. http://gbracha.blogspot.com/2010/03/through-looking-glass-darkly.html (an old, pre-dart, blog post of mine on mirrors)
  4. http://www.wirfs-brock.com/allen/posts/228 (Allen Wirfs-Brock's blog. Allen was a mirror pioneer back in Smalltalk in the 90s)
  5. http://www.wirfs-brock.com/allen/posts/245

You can also search my blog, or Allen Wirf-Brock's for posts on the topic.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!