Hacker News new | ask | show | jobs
by manilafolder 4466 days ago
I'm sorry for my ignorance, but there's something about type providers I just can't wrap my head around.

It seems like the primary purpose of using a typed provider is so that the types (classes) can dynamically change during runtime (for example, you get different table objects for the different connection strings you pass in). But how do you program a client against an API that can change at will? Is your client code just basically doing runtime reflection on the data the type provider returns?

2 comments

My understanding is that type providers define the types at compile time.
As far as I can tell, Type Providers are just a slicker way of having external codegen tools. So instead of "SoapToVBCode.exe" you have it wrapped up in a type provider and can just do "type MySoap = SoapProvider<http://wsdl>".

It seems like a useful feature but far from the power of having full macros.