Skip to content

Commit 1f61fd4

Browse files
committed
Document default values for native numerics
1 parent 95fd2d7 commit 1f61fd4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

doc/Language/numerics.pod6

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,13 @@ my int $a-native = -42;
561561
{ for ^1000_000 { abs $a-native }; say now - ENTER now } # OUTPUT: «0.3088305␤»
562562
=end code
563563
564+
=head2 Default Values
565+
566+
Since there are no classes behind native types, there are no type objects you'd normally get
567+
with variables that haven't been initialized. Thus, native types are automatically initialized
568+
to zero. In 6.c language, native floating point types (C<num>, C<num32>, and C<num64>) are
569+
initialized to value C<NaN>; it is proposed for default to become C<0e0> in 6.d language.
570+
564571
=head2 Native Dispatch
565572
566573
It is possible to have native candidates alongside non-native candidates to, for example,

0 commit comments

Comments
 (0)