Hacker News new | past | comments | ask | show | jobs | submit login

so, yes this leveraging of dynamic metadata provider technically satisfies the requirements for a mixin, but you're still not applying this mixin to a poco, therefore i don't think it's fair to say the language/spec supports it natively.

this is another example of adding mixins to .net code via 3rd party library: http://remix.codeplex.com/




"but you're still not applying this mixin to a poco"

Clarify?


POCO = Plain Old (CLR) Object

The distinction I'm drawing here is what is meant by 'natively supports' and 'supported via a 3rd party library'


That's what I need clarification on. the dynamic keyword wasn't provided by any 3rd party library (it's part of the C# language specification)... how is System.DynamicObject and IDynamicMetaObjectProvider different then System.Object? All poco's inherit System.Object. Do you consider System.Object as 3rd party? True, by default poco's don't inherit from System.DynamiObject. Does that make it not 'natively supported'?


No, what I mean by that is in order to use mixins, in any example I've seen, you need to inherit from a class someone else provided that gives it.

Assembly provides all the mechanisms for the dynamic keyword, I wouldn't say it is a feature of x86.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: