Hacker News new | ask | show | jobs
by profquail 4066 days ago
I contributed the fix for the high-ranking array support.

The main reason for the fix was because F# pre-4.0 can't reference overloaded methods where one or more of the overloads has one or more parameters which is an array of rank 5 or more. I had a 3rd party DLL I wanted to reference, where a class had generic overloads for all of the array ranks, e.g.,:

    MyClass.Foo(T[])
    MyClass.Foo(T[,])
    ...
    MyClass.Foo(T[,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,])
Even though I was only trying to use MyClass.Foo(T[]), the F# compiler's overload resolution failed due to the presence of the higher-ranked array types.

I'm not planning to use such arrays any time soon, but I wanted to make sure that if other code was using these arrays I could reference it from F#.