fsharp
fsharp copied to clipboard
FSI pretty print of values shows the same text for records and anonymous records
The following code:
type Phillip = { Name: string; Age: int}
let p = { Name="Phillip"; Age=28}
let ap = {| Name="Phillip"; Age=28 |}
Prints values in FSI that are identical:

The types are pretty-printed correctly as you would expect.
BTW, it looks like FSI prints it very different to current formatting conventions. Should I fire a separate issue trying to list such cases?
So I believe FSI uses reflection, at which point the values are all the same. However in the case of the anonymous record it prints in alphabetical order.
A way to distinguish an anonymous record is that it uses a SHA-1 as the actual name under the covers. Perhaps that could be an indicator.