Skip to content

Commit 072652a

Browse files
authored
Update record.md
1 parent 675c4f3 commit 072652a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/types/record.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Record types
22

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.
46
57
```
68
type N1 = { x : decimal, y : decimal };
@@ -14,7 +16,7 @@ type N2 = {
1416
};
1517
```
1618

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.
1820
1921
## Version control
2022

@@ -81,3 +83,4 @@ type A = { x:Number };
8183
// B < A
8284
type B = { y:Number, ...A };
8385
```
86+

0 commit comments

Comments
 (0)