F #: Do double reverse name names interfere with function names?

In Visual Studio 2015:

let myFunction (``string`` : string) =
    "\"Quoted string\"" |> (Regex "\"[^\"]*\"").Match |> string

let myOtherFunction (str : string) =
    "\"Quoted string\"" |> (Regex "\"[^\"]*\"").Match |> string

The first function generates a compiler error, the function is stringunderlined in red. ("This expression was supposed to be of type Match → 'a, but here it has a string of type")

The second function is beautiful, no problem.

Is it for design?

+4
source share
1 answer

The reason is that your parameter and the call at the end is the same thing. Double backlinks are used to avoid the name, they are not part of the name .

, , ``string`` string - , . , .

# - @, , , @hello hello.

+5

Source: https://habr.com/ru/post/1675398/


All Articles