- 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.
- 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.
- * .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.
- * F# type providers (see [MSDN]) 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] should be a good example.
- : http://msdn.microsoft.com/en-us/library/hh156509.aspx
- : http://tpetricek.github.com/FSharp.Data/
a guest Jan 27th, 2013 59 Never
RAW Paste Data