FAQ
Author: larry
Date: Mon Apr 10 21:39:58 2006
New Revision: 8645

Modified:
doc/trunk/design/syn/S02.pod

Log:
Outlawed 42. (but inlawed .42)


Modified: doc/trunk/design/syn/S02.pod
==============================================================================
--- doc/trunk/design/syn/S02.pod (original)
+++ doc/trunk/design/syn/S02.pod Mon Apr 10 21:39:58 2006
@@ -215,8 +215,8 @@
of it is always considered a method call on C<$_> where a term is
expected. If a term is not expected at this point, it is a syntax
error. (Unless, of course, there is an infix operator of that name
-beginning with dot. You could, for instance, define a Fortranly C<<
-infix:<.EQ.> >> if the fit took you. But you'll have to be sure to
+beginning with dot. You could, for instance, define a Fortranly
+C<< infix:<.EQ.> >> if the fit took you. But you'll have to be sure to
always put whitespace in front of it, or it would be interpreted as
a postfix method call instead.)

@@ -244,6 +244,15 @@

if you mean the postfix method call.

+One consequence of all this is that you may no longer write a Num as
+C<42.> with just a trailing dot. You must instead say either C<42>
+or C<42.0>. In other words, a dot following a number can only be a
+decimal point if the following character is a digit. Otherwise the
+postfix dot will be taken to be the start of some kind of method call
+syntax, whether long-dotty or not. (The C<.123> form with a leading
+dot is still allowed however when a term is expected, and is equivalent
+to C<0.123>.)
+
=back

=head1 Built-In Data Types

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupperl6-language @
categoriesperl
postedApr 11, '06 at 4:40a
activeApr 11, '06 at 4:40a
posts1
users1
websiteperl6.org

1 user in discussion

Larry: 1 post

People

Translate

site design / logo © 2021 Grokbase