What is the const
keyword in f#. It highlights in visual studio and the error message also calls it a keyword as shown below:
However I could not find it in MSDN https://msdn.microsoft.com/en-us/library/dd233249.aspx or the official language spec http://fsharp.org/specs/language-spec/3.0/FSharpSpec-3.0-final.pdf
Question: any docs on this reserved keyword?
F or f is a written abbreviation for words beginning with f, such as 'female', 'feminine', 'franc', ' false', and 'Fahrenheit'. Heat the oven to 400 degrees F.
1 usually obscene : to engage in coitus with —sometimes used interjectionally with an object (such as a personal or reflexive pronoun) to express anger, contempt, or disgust. 2 usually vulgar : to deal with unfairly or harshly : cheat, screw. — see also fuck off, fuck up. fuck.
On the internet, “F” is a slang term used to “pay respects” or commiserate in a tragic incident.
Press F to Pay Respects Meaning Even when it may seem obvious, the F meme is just a way to pay respects to the fallen. It is now used to either show sympathy for someone in disgrace or to mock them as they fail.
It's right there in the bottom of the first link you pasted:
https://msdn.microsoft.com/en-us/library/dd233249.aspx
The following tokens are reserved as keywords for future expansion of the F# language:
const
[<Literal>]
let something = 2
Values that are intended to be constants can be marked with the Literal attribute. This attribute has the effect of causing a value to be compiled as a constant. see https://learn.microsoft.com/en-us/dotnet/fsharp/language-reference/literals
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