You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| F# 4.1 | FS-1007 |[Additional Option Module Functions](https://github.com/fsharp/fslang-design/tree/main/FSharp-4.1/FS-1007-additional-Option-module-functions.md)| This specifies some details of the `FSharp.Core` library, which is not part of this spec (except for the basic items listed in [§18](https://fsharp.github.io/fslang-spec/the-f-library-fsharpcoredll/)) |
| F# 4.1 | FS-1009 |[Mutually Referential Types and Modules in Single Scope](https://github.com/fsharp/fslang-design/tree/main/FSharp-4.1/FS-1009-mutually-referential-types-and-modules-single-scope.md)||
23
23
| F# 4.1 | FS-1010 |[Add Map.count](https://github.com/fsharp/fslang-design/tree/main/FSharp-4.1/FS-1010-add-map-count.md)| This specifies some details of the `FSharp.Core` library, which is not part of this spec (except for the basic items listed in [§18](https://fsharp.github.io/fslang-spec/the-f-library-fsharpcoredll/)) |
24
24
| F# 4.1 | FS-1012 |[Caller Info Attributes](https://github.com/fsharp/fslang-design/tree/main/FSharp-4.1/FS-1012-caller-info-attributes.md)|[completed](https://github.com/fsharp/fslang-spec/pull/74)|
type BadStruct3 (data : float, rest : BadStruct3 ) =
1269
1271
member s.Data = data
1270
1272
member s.Rest = rest
1271
1273
```
@@ -1295,6 +1297,18 @@ abnormal value.
1295
1297
Public struct types for use from other CLI languages should be designed with the
1296
1298
existence of the default zero-initializing constructor in mind.
1297
1299
1300
+
[Record Type Defintions](#record-type-definitions) may also use the `[<Struct>]` attribute to change their representation from a reference type to a value type:
1301
+
1302
+
```fsharp
1303
+
[<Struct>]
1304
+
type Vector3 = { X: float; Y: float; Z: float }
1305
+
```
1306
+
1307
+
Record structs have the following limitations:
1308
+
1309
+
- Unlike normal F# structs you cannot call the default constructor
1310
+
- When marked with `[<CLIMutable>]` attribute, a default constructor is not created because it already exists implicitly
1311
+
1298
1312
## Enum Type Definitions
1299
1313
1300
1314
Occasionally the need arises to represent a type that compiles as a CLI enumeration type. An _enum
0 commit comments