.perl and other methods on Junctions?

2008-11-04 Thread Patrick R. Michaud
Consider the code:

my $x = 3 | 'foo';
my $y = $x.perl;


Does $y end up as a junction of strings or as a single string?

Asking more directly, does .perl autothread over a Junction?
If .perl does not autothread, then is there some way of knowing
which methods autothread and which do not?

(The question of method autothreading over junctions came up at
the OSCON 2008 hackathon, but I don't know that it was ever
resolved.  If it was and I've just forgotten or overlooked the
resolution,  I'll be happy to have it pointed out to me.)

Thanks!

Pm


[svn:perl6-synopsis] r14599 - doc/trunk/design/syn

2008-11-04 Thread larry
Author: larry
Date: Tue Nov  4 15:14:32 2008
New Revision: 14599

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

Log:
Define () as the Nil type


Modified: doc/trunk/design/syn/S02.pod
==
--- doc/trunk/design/syn/S02.pod(original)
+++ doc/trunk/design/syn/S02.podTue Nov  4 15:14:32 2008
@@ -12,9 +12,9 @@
 
   Maintainer: Larry Wall <[EMAIL PROTECTED]>
   Date: 10 Aug 2004
-  Last Modified: 14 Oct 2008
+  Last Modified: 4 Nov 2008
   Number: 2
-  Version: 139
+  Version: 140
 
 This document summarizes Apocalypse 2, which covers small-scale
 lexical items and typological issues.  (These Synopses also contain
@@ -860,6 +860,7 @@
 built-in C and C functions.  (See S04 for how failures
 are handled.)
 
+Nil Empty list viewed as an item
 Object  Uninitialized (derivatives serve as protoobjects of classes)
 WhateverWildcard (like undef, but subject to do-what-I-mean via MMD)
 Failure Failure (lazy exceptions, thrown if not handled properly)
@@ -875,6 +876,13 @@
 type is also undefined, but excludes C so that autothreading
 may be dispatched using normal multiple dispatch rules.)
 
+The C type is officially undefined as an item but interpolates
+as a null list into list context, and an empty capture into slice
+context.  A C object may also carry failure information,
+but if so, the object behaves as a failure only in item context.
+Use C/C when you want to return a hard failure that
+will not evaporate in list context.
+
 =head2 Immutable types
 
 Objects with these types behave like values, i.e. C<$x === $y> is true