﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Ayende Rahien commented on The difference between meta programming and IL weaving</title><description>Scott,
  
Given meta programming, I can _add_ duck typing, the other way around is where I get into trouble.
  
</description><link>http://ayende.com/2973/the-difference-between-meta-programming-and-il-weaving#comment6</link><guid>http://ayende.com/2973/the-difference-between-meta-programming-and-il-weaving#comment6</guid><pubDate>Tue, 27 Nov 2007 14:41:56 GMT</pubDate></item><item><title>Ayende Rahien commented on The difference between meta programming and IL weaving</title><description>Ko,
  
No, post compile is not sufficient, that is basically IL Weaving, and it is not working, because you have no way to refer to the results of this method.
</description><link>http://ayende.com/2973/the-difference-between-meta-programming-and-il-weaving#comment5</link><guid>http://ayende.com/2973/the-difference-between-meta-programming-and-il-weaving#comment5</guid><pubDate>Tue, 27 Nov 2007 14:41:06 GMT</pubDate></item><item><title>Scott Bellware commented on The difference between meta programming and IL weaving</title><description>&gt; That is not something that you can do with a method missing
  
  
If a member can be added to an object at runtime, it could be added from MethodMissing.
  
  
It would seem like C# would need duck typing regardless of where new members are added from at runtime.
  
  
Is duck typing out of bounds for what you envision for a meta programming solution?
</description><link>http://ayende.com/2973/the-difference-between-meta-programming-and-il-weaving#comment4</link><guid>http://ayende.com/2973/the-difference-between-meta-programming-and-il-weaving#comment4</guid><pubDate>Tue, 27 Nov 2007 08:27:23 GMT</pubDate></item><item><title>Ko commented on The difference between meta programming and IL weaving</title><description>And what about post-compilation weaving such as done by PostSharp? Granted, still not the first-class support achievable with meta-programming, but goes a long way to improve upon runtime weaving.
</description><link>http://ayende.com/2973/the-difference-between-meta-programming-and-il-weaving#comment3</link><guid>http://ayende.com/2973/the-difference-between-meta-programming-and-il-weaving#comment3</guid><pubDate>Tue, 27 Nov 2007 08:04:08 GMT</pubDate></item><item><title>Ayende Rahien commented on The difference between meta programming and IL weaving</title><description>IDynamicObject.MethodMissing would go a long way, but it solves only a part of the problem, actually.
  
Adding members, interfaces, etc, to the code is just as important.
  
That is not something that you can do with a method missing.
</description><link>http://ayende.com/2973/the-difference-between-meta-programming-and-il-weaving#comment2</link><guid>http://ayende.com/2973/the-difference-between-meta-programming-and-il-weaving#comment2</guid><pubDate>Tue, 27 Nov 2007 06:41:09 GMT</pubDate></item><item><title>Scott Bellware commented on The difference between meta programming and IL weaving</title><description>I know this is probably such an obvious comment to make that it might just be completely lame, but...
  
  
All these rules are different in a dynamic language like IronRuby, where ensuring the presence of invocation sites is done at run time... or where you might be able to add the implementation of IDisposable at runtime by calling Dispose().
  
  
I've heard you say that all you need is an IDynamicObject interface and support for it in the runtime to achieve what Ruby can achieve.
  
  
Not knowing the depths of the details of what you have in mind, would something like IDynamicObject.MethodMissing() give you what you need?  Does it mean that  the compiler would switch to a duck typing mode when it encounters a class that implements IDynamicObject?
</description><link>http://ayende.com/2973/the-difference-between-meta-programming-and-il-weaving#comment1</link><guid>http://ayende.com/2973/the-difference-between-meta-programming-and-il-weaving#comment1</guid><pubDate>Tue, 27 Nov 2007 03:06:42 GMT</pubDate></item></channel></rss>