Check out the Pastebin Gadgets Shop. We have thousands of fun, geeky & affordable gadgets on sale :-)Want more features on Pastebin? Sign Up, it's FREE!


By: a guest on Jan 27th, 2013  |  syntax: None  |  size: 1.07 KB  |  views: 48  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print  |  QR code  |  clone
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Giving a good answer to this question (from the F# perspective) is not really possible. F# provides a number of mechanisms that you can use to mainpulate with types and you would choose one of them depending on the use.
  3. I can _theoretically_ understand what you mean by "first-class types", but that is a view from a different perspective than the one used in F# - so F# has several concepts that might fit, but no single concept will work in all cases.
  5.  * .NET Reflection (demonstrated by other answers) lets you generate real .NET types that have properties, methods etc. This is used mainly by mocking libraries (for testing) or by compilers of dynamic languages, but it is not needed for normal end-user programming.
  7.  * F# type providers (see [MSDN][1]) let you generate type before compilation of the main program. The types can be used to access databases or other data (XML, CSV, JSON) or external data sources. The [F# Data library][2] should be a good example.
  10.   [1]:
  11.   [2]:
clone this paste RAW Paste Data