I searched here and on the net but no answer.
The reason I ask is, since F# conventions seems like they favor noncapital letters, using BCL types with Pascal conventions look weird in F#, as in:
let stringD = String.Join(" ",[| stringA; stringB |])
Seems like it would be more in the spirit of F# like this:
let stringD = string.join(" ",[| stringA; stringB |])
Ok, a few things.
First, F# is case-sensitive.
Second, the F# conventions for naming are described in the F# Component Design Guidelines . Briefly, let-bound members inside F# modules use camelCase, but all .NET OO constructs use PascalCase. This is true throughout the F# library.
Finally, in F# string
is not a keyword, rather it is both the name of a type abbreviation (for System.String
) and the name of a function (that converts to a string). In the expression context of string.Join
, the function name takes precedence, which is why string.Join
does not work. And because of case-sensitivity, System.String.join
would never work (unless e.g. you added an extension member).
Yes, F# is case-sensitive
let stringD = string.join(" ",[| stringA; stringB |])
Will not work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With