Skip to content

Commit 2ad2a1e

Browse files
committed
Document multi ambiguity between int and uint
As veesh++ points out, multis cannot distinguish between `int` and `uint` any more than they can distinguish between `int and `int64`.
1 parent 5d568b3 commit 2ad2a1e

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

doc/Language/nativetypes.pod6

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,16 @@ counterparts:
5555
5656
B<Note>: In v6.c, the default value for C<num> would have been a NaN.
5757
58-
This is due to the fact that Natives don't know their types because they're just
59-
values, without any metadata. In
60-
L<multi-dispatch|/language/glossary#Multi-Dispatch>, you can have a native
61-
candidate, but you cannot differentiate different sizes of the same native type.
62-
That is, you can have an L<Int|/type/Int> and L<int|/type/int> candidates, but
63-
there would be an ambiguity between, for instance L<int|/type/int>,
64-
L<atomicint|/type/atomicint> or L<int64|/language/nativetypes#index-entry-int64>
65-
candidates.
58+
This is due to the fact that Natives don't know their types because
59+
they're just values, without any metadata. In
60+
L<multi-dispatch|/language/glossary#Multi-Dispatch>, you can have a
61+
native candidate, but you cannot differentiate different sizes or
62+
signedness of the same native type. That is, you can have an
63+
L<Int|/type/Int> and L<int|/type/int> candidates, but there would be an
64+
ambiguity between, for instance L<int|/type/int>,
65+
L<uint|/language/nativetypes#index-entry-uint>,
66+
L<atomicint|/type/atomicint> or
67+
L<int64|/language/nativetypes#index-entry-int64> candidates.
6668
6769
They cannot be bound either. Trying to do C<my num $numillo := 3.5> will
6870
raise the exception C<Cannot bind to natively typed variable

0 commit comments

Comments
 (0)