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
Copy file name to clipboardExpand all lines: src/types/record.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
1
# Record types
2
2
3
-
Record types `{ ... }` are simple property records, whose field order is sensitive. Those types are compiled into efficient structures.
3
+
Record types `{ ... }` are simple property records. Record types are memory-efficient in cost of a hash-map-like field access.
4
+
5
+
> **Note**: The decision for having record types compiling into hash-map structures is because these types use to contain many fields, for instance, in WhackDS components.
4
6
5
7
```
6
8
type N1 = { x : decimal, y : decimal };
@@ -14,7 +16,7 @@ type N2 = {
14
16
};
15
17
```
16
18
17
-
> **Note**: Record types do not match with types structurally. They are simply structures the user may express inline.
19
+
> **Note**: Record types do not match with types structurally unlike in structural-type-first languages. They are simply structures the user may express inline.
0 commit comments