Commit a2ba8cb
committed
feat!: refactor to support eliding arguments
This commit allows arguments to be omitted when invoking the
constructor, thus allowing more concise syntax when creating slices.
BREAKING CHANGE: support argument omission
Existing code should continue to work as is; however, error handling
has changed. One can now create a slice without providing arguments.
To adopt the new syntax, one no longer has to explicitly provide
`null` for "empty" slice parameters.1 parent 1f41686 commit a2ba8cb
6 files changed
Lines changed: 566 additions & 197 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
51 | 70 | | |
52 | 71 | | |
53 | 72 | | |
54 | | - | |
| 73 | + | |
55 | 74 | | |
56 | | - | |
| 75 | + | |
57 | 76 | | |
58 | 77 | | |
59 | 78 | | |
60 | | - | |
61 | | - | |
62 | 79 | | |
63 | 80 | | |
64 | 81 | | |
| |||
206 | 223 | | |
207 | 224 | | |
208 | 225 | | |
| 226 | + | |
209 | 227 | | |
210 | 228 | | |
211 | 229 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
| 8 | + | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
11 | 30 | | |
12 | 31 | | |
13 | | - | |
| 32 | + | |
14 | 33 | | |
15 | 34 | | |
16 | 35 | | |
| |||
20 | 39 | | |
21 | 40 | | |
22 | 41 | | |
23 | | - | |
24 | | - | |
| 42 | + | |
25 | 43 | | |
26 | 44 | | |
27 | 45 | | |
| |||
0 commit comments