All sounds good up to:
Larry Wall wrote:
The cultural ambiguity is also being reduced insofar as we're trying
to discourage use of bare constants in favor of sigilled constants.
If you see a bare function name you should generally assume it
has arguments in Perl 6.
Well, in that case, should pi, e, et al. become $pi, $e, @et al.? ;)
Seriously, though, I think we discussed this before, and we kept those
constants as bare, but if there's a cultural shift, then those would
probably be its poster-children. I'm also in favor of the $π type
Unicode equivalents for uniformity. Boolean constants are more
questionable, as is the zeroary undef, which is pretty hard-coded in the
brain of the average Perl programmer.
Right now, in the Math::Basic API doc, we have:
------------------------
=head2 Constants
To export the constants provided by C<Math::Basic> use the C<:constants>
tag when importing:
use Math::Basic :constants;
=over
=item e
constant Num Math::Basic::e
The constant C<e>, roughly equal to C<2.71828182845905>.
=item euler_constant
constant Num Math::Basic::γ
constant Num Math::Basic::euler_constant
The Euler constant (or Euler-Mascheroni constant or simply γ), roughly
equal to C<0.57721566490153286>. This constant should not be confused
with C<e>.
=item golden_ratio
constant Num Math::Basic::φ
constant Num Math::Basic::phi
constant Num Math::Basic::golden_ratio
The golden ratio, roughly equal to C<1.6180339887498948>.
=item i
constant Complex Math::Basic::i
The constant C<i>, which is defined as the square root of C<-1>.
=item one
constant Complex Math::Basic::one
The constant value C<1>.
=item pi
constant Num Math::Basic::π
constant Num Math::Basic::pi
The constant C<pi>, roughly equal to C<3.14159265358979>.
=item zero
constant Complex Math::Basic::zero
The constant value C<0>.
=back
------------------------
Yes, I've spotted the bug in one and zero being complex for no good reason.
If you think that we should change to sigiled constants, then I will
make it:
------------------------
=head2 Constants
To export the constants provided by C<Math::Basic> use the C<:constants>
tag when importing:
use Math::Basic :constants;
=over
=item $e
constant Num $Math::Basic::e
The constant C<e>, roughly equal to C<2.71828182845905>.
=item $euler_constant
constant Num $Math::Basic::γ
constant Num $Math::Basic::euler_constant
The Euler constant (or Euler-Mascheroni constant or simply γ), roughly
equal to C<0.57721566490153286>. This constant should not be confused
with C<e>.
=item $golden_ratio
constant Num $Math::Basic::φ
constant Num $Math::Basic::phi
constant Num $Math::Basic::golden_ratio
The golden ratio, roughly equal to C<1.6180339887498948>.
=item $i
constant Complex $Math::Basic::i
The constant C<i>, which is defined as the square root of C<-1>.
=item $one
constant Int $Math::Basic::one
The constant value C<1>.
=item $pi
constant Num $Math::Basic::π
constant Num $Math::Basic::pi
The constant C<pi>, roughly equal to C<3.14159265358979>.
=item $zero
constant Int $Math::Basic::zero
The constant value C<0>.
=back
------------------------