I got a response from Luke at Microsoft:

You

are right that F# doesn’t code-gen the IsInitOnly flag. It would certainly be

possible to emit it more often, but in general F# needs the flexibility to have

different notions of immutability than those of the IsInitOnly flag in the CLR.

So you won’t be able to treat “F# immutable” as equivalent to “IsInitOnly is

true”. Of course, the result is that .NET reflection cannot discover F#

immutability. You could take a look at FSharp.PowerPack.Metadata in the F#

PowerPack, which provides some functionality for reading the F# metadata

directly.

By on 7/10/2009 3:01 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper