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

What are you talking about?

In C# you can make your objects implement IDynamicObject with this signature ...

     public interface IDynamicObject {
          MetaObject GetMetaObject(Expression parameter);
     }
That returned MetaObject is responsible for defining the runtime dispatching, and you can do it however you want. The "binders" defined in MetaObject are returning Expressions, which means that the DLR library also has a chance to do inline caching.

F# uses the same API.

> Just means the tools (IntelliSense/compiler) can't provide the info I need, and I'm forced to go read documentation for small things.

Yeah, reading documentation in this day and age. The horror!




Interesting, thank for the info on that interface. F# doesn't use that though; it simply has syntax support for a user-defined dynamic operator. That is, I can do foo?bar and I'll get bar as a string and do what I please. The types you mention don't even appear in the F# compiler source.

As far as reading documentation, I shouldn't be forced to lookup tiny things here and there because an API decides to use object type for each parameter.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: