Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Change default reported type annotation for arrays #635
Change default reported type annotation for arrays
I propose we change F# lists reported type annotations to always use
For example, the following output in FSI is incredibly confusing because it's apparently inconsistent to new users:
> let x =  let y = [| |];; val x : 'a list val y : 'a 
While lists are declared using
I propose to change type annotations which are reported (tooltips, FSI, intellisense) to display as this instead:
> let x =  let y = [| |];; val x : 'a list val y : 'a array
Note that I am not suggesting changing or breaking compatibility. Using
Pros and Cons
The advantages of making this adjustment to F# are consistency for new users. Arrays would be obvious as arrays instead of being confused as lists.
The disadvantages of making this adjustment to F# are that it's a change from previous behavior.
Estimated cost (XS, S, M, L, XL, XXL): S?
Affidavit (please submit!)
Please tick this by placing a cross in the box:
Please tick all that apply: