FAQ
Author: lwall
Date: 2009-03-07 19:19:29 +0100 (Sat, 07 Mar 2009)
New Revision: 25735

Modified:
docs/Perl6/Spec/S02-bits.pod
Log:
disallow bare <> as probable p5ism


Modified: docs/Perl6/Spec/S02-bits.pod
===================================================================
--- docs/Perl6/Spec/S02-bits.pod 2009-03-07 17:40:43 UTC (rev 25734)
+++ docs/Perl6/Spec/S02-bits.pod 2009-03-07 18:19:29 UTC (rev 25735)
@@ -12,9 +12,9 @@

Maintainer: Larry Wall <larry@wall.org>
Date: 10 Aug 2004
- Last Modified: 4 Mar 2009
+ Last Modified: 7 Mar 2009
Number: 2
- Version: 157
+ Version: 158

This document summarizes Apocalypse 2, which covers small-scale
lexical items and typological issues. (These Synopses also contain
@@ -2418,7 +2418,7 @@
$a = \('a', 'b');

Likewise, if bound to a scalar parameter, C<< <a b> >> will be
-treated as a single list object, but if bound to a slurpy parameter,
+treated as a single C<Capture> object, but if bound to a slurpy parameter,
it will auto-flatten.

But note that under the parenthesis-rewrite rule, a single value will
@@ -2432,6 +2432,15 @@
To force a single value to become a list object in item context,
you should use C<< ['a'] >> for clarity as well as correctness.

+The degenerate case C<< <> >> is disallowed as a probable attempt to
+do IO in the style of Perl 5; that is now written C<< =<> >>. (C<<
+<STDIN> >> is also disallowed.) Empty lists are better written with
+C<()> or C<Nil> in any case because C<< <> >> will often be misread
+as meaning C<('')>. (Likewise the subscript form C<< %foo<> >>
+should be written C<%foo{}> to avoid misreading as C<@foo{''}.)
+If you really want the angle form for stylistic reasons, you can
+suppress the error by putting a space inside: C<< < > >>.
+
Much like the relationship between single quotes and double quotes, single
angles do not interpolate while double angles do. The double angles may
be written either with French quotes, C<«$foo @bar[]»>, or

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupperl6-language @
categoriesperl
postedMar 7, '09 at 6:19p
activeMar 7, '09 at 6:19p
posts1
users1
websiteperl6.org

1 user in discussion

Pugs-commits: 1 post

People

Translate

site design / logo © 2021 Grokbase