arraysf#immutability

Why there is no F# immutable arrays?


I am new to F# and I noticed that arrays are still mutable. Is this because of the performance implications or because the inherent .NET CLR type system? I am aware that immutable lists do exist.

Thank you


Solution

  • Many people agree with you that F# should have immutable arrays, including the language creators; there's an issue covering it in the fslang-suggestions clearing house, currently in approved-in-principle state.

    As for why it wasn't there from the start, it was likely just a low priority compared to other features.