Skip to content

Commit e63fae8

Browse files
authored
escape [<CompiledName>]
Also clarified the role of CompiledName attribute. You can see an examples of the attribute usage in https://github.com/fsharp/fsharp/blob/master/src/fsharp/FSharp.Core/option.fs#L52
1 parent 4bdd34b commit e63fae8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/fsharp/style-guide/component-design-guidelines.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ This guidance corresponds to general .NET guidance for these types. However, it
247247

248248
#### Consider using `[<CompiledName>]` to provide a .NET-friendly name for other .NET language consumers
249249

250-
Sometimes you may wish name something in one style for F# consumers (such as a static member in lower case), but have a different style for the name when it is compiled into an assembly. You can use the [<CompiledName>] attribute to provide a different style for code which is consuming the assembly the code is defined in.
250+
Sometimes you may wish name something in one style for F# consumers (such as a static member in lower case), but have a different style for the name when it is compiled into an assembly. You can use the `[<CompiledName>]` attribute to provide a different style for non F# code consuming the assembly.
251251

252252
```fsharp
253253
type Vector(x:float, y:float) =
@@ -261,7 +261,7 @@ type Vector(x:float, y:float) =
261261
let v = Vector.create 5.0 3.0
262262
```
263263

264-
By using `[<CompiledName>]`, you can use .NET naming conventions for consumers of the assembly the code is defined in, but use a different naming convention for F# code within the assembly.
264+
By using `[<CompiledName>]`, you can use .NET naming conventions for non F# consumers of the assembly.
265265

266266
#### Use method overloading for member functions, if doing so provides a simpler API
267267

0 commit comments

Comments
 (0)