How F # Type Providers Test Types at Compile Time

So, I am learning F # and looking at this:

F # type providers how they work

and this:

http://msdn.microsoft.com/en-us/library/hh361033(v=vs.110).aspx

I'm not very sure about F #, but my (possibly incomplete) understanding is that Type Providers are designed to provide you with a kind of static type of secure access to external data sources.

However, how do they do it? Since the data source is external, it seems to me that there is no way to check the data source schema without requesting it, and requesting material at compile time (and to complete the code!) Seems to be bad.

If they do not, however, some kind of casting must occur in order to transfer the unknown data source to some circuit (which can then be checked by type), which has the possibility of failure if the data source cannot be casted .

+5
source share
1 answer

You ask some good questions:

  • Does the type provider contain an external data source at compile time?

    . FSharp.Data.TypeProviders , . , # , ( / " " ). F # , . , , , , .

  • , , ...?

    , , . , , , ( , , , ).

    , - - , ( , ), (, , ).

, , -, - - ( , , , ).

+7

All Articles