反射编程范例介绍了概念的元信息,保持知识的程序结构。
The reflective programming paradigm introduces the concept of meta-information, which keeps knowledge of program structure.
Rails应用程序并不使用配置文件,而是使用几条简单的编程约定,从而允许通过反射和发现来查明所有配置。
Instead of configuration files, a Rails application USES a few simple programming conventions that allow it to figure out everything through reflection and discovery.
您可以用其它编程语言创建类似的功能,但Python提供了非常通用的反射机制,而且能够清晰地表达有效性约束。
You could create an analogous capability in other programming languages, but Python provides particularly versatile reflection mechanisms, and allows clear expression of validity constraints.
应用推荐