digitalmars.D - Igor Stepanov's runtime reflection patch
- Vladimir Panteleev (22/22) Jan 12 2012 Igor Stepanov has finished his runtime reflection patch,
- Trass3r (1/3) Jan 12 2012 Why the heck isn't the dmd patch a fork as well?
- Vladimir Panteleev (4/8) Jan 12 2012 Walter said[1] that compiler modifications that change the
- Brad Roberts (2/11) Jan 12 2012 He meant not a language fork. And by patch, I'm sure he included pull r...
- Jacob Carlborg (4/15) Jan 12 2012 I see no reason why Walter would want a patch instead of a pull request.
- Jacob Carlborg (5/25) Jan 12 2012 Cool, but do we really want all these enums (Linkage, StorageClass and
Igor Stepanov has finished his runtime reflection patch, announced here a while ago. [1] DMD patch against commit c50eb5f (from December 31): http://j.mp/xdI0hb Druntime Github fork: https://github.com/IgorStepanov/druntime User classes can declare a getMembers method, which becomes available in the classinfo. The patch adds implicit generation of getMembers information for all classes and structures, which do not declare the method explicitly. Usage is simple: YourClass.classinfo.getMembers("field") returns a list of fields with that name (MemberInfo array). Use null to get all fields. This also works for modules and enumerations. The patch also adds linkage and argument information to function TypeInfo. An example of what would be possible with this patch: call arbitrary methods by name and a Variant array as parameters, and obtaining the result as a Variant. Igor has asked about the potential of this patch to be included into DMD. I imagine that the consensus would be that it should at least be enabled (or disabled) with a compiler switch, or attribute in the source code. [1]: http://j.mp/wZLCDb
Jan 12 2012
DMD patch against commit c50eb5f (from December 31): http://j.mp/xdI0hb Druntime Github fork: https://github.com/IgorStepanov/druntimeWhy the heck isn't the dmd patch a fork as well?
Jan 12 2012
On Friday, 13 January 2012 at 01:52:04 UTC, Trass3r wrote:Walter said[1] that compiler modifications that change the language are better-off distributed as patches. [1]: http://j.mp/w6PnwFDMD patch against commit c50eb5f (from December 31): http://j.mp/xdI0hb Druntime Github fork: https://github.com/IgorStepanov/druntimeWhy the heck isn't the dmd patch a fork as well?
Jan 12 2012
On 1/12/2012 7:48 PM, Vladimir Panteleev wrote:On Friday, 13 January 2012 at 01:52:04 UTC, Trass3r wrote:He meant not a language fork. And by patch, I'm sure he included pull requests. Terminology differences.Walter said[1] that compiler modifications that change the language are better-off distributed as patches. [1]: http://j.mp/w6PnwFDMD patch against commit c50eb5f (from December 31): http://j.mp/xdI0hb Druntime Github fork: https://github.com/IgorStepanov/druntimeWhy the heck isn't the dmd patch a fork as well?
Jan 12 2012
On 2012-01-13 05:33, Brad Roberts wrote:On 1/12/2012 7:48 PM, Vladimir Panteleev wrote:I see no reason why Walter would want a patch instead of a pull request. -- /Jacob CarlborgOn Friday, 13 January 2012 at 01:52:04 UTC, Trass3r wrote:He meant not a language fork. And by patch, I'm sure he included pull requests. Terminology differences.Walter said[1] that compiler modifications that change the language are better-off distributed as patches. [1]: http://j.mp/w6PnwFDMD patch against commit c50eb5f (from December 31): http://j.mp/xdI0hb Druntime Github fork: https://github.com/IgorStepanov/druntimeWhy the heck isn't the dmd patch a fork as well?
Jan 12 2012
On 2012-01-13 00:50, Vladimir Panteleev wrote:Igor Stepanov has finished his runtime reflection patch, announced here a while ago. [1] DMD patch against commit c50eb5f (from December 31): http://j.mp/xdI0hb Druntime Github fork: https://github.com/IgorStepanov/druntime User classes can declare a getMembers method, which becomes available in the classinfo. The patch adds implicit generation of getMembers information for all classes and structures, which do not declare the method explicitly. Usage is simple: YourClass.classinfo.getMembers("field") returns a list of fields with that name (MemberInfo array). Use null to get all fields. This also works for modules and enumerations. The patch also adds linkage and argument information to function TypeInfo. An example of what would be possible with this patch: call arbitrary methods by name and a Variant array as parameters, and obtaining the result as a Variant. Igor has asked about the potential of this patch to be included into DMD. I imagine that the consensus would be that it should at least be enabled (or disabled) with a compiler switch, or attribute in the source code. [1]: http://j.mp/wZLCDbCool, but do we really want all these enums (Linkage, StorageClass and so on) at global scope? -- /Jacob Carlborg
Jan 12 2012