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

2006-04-06 Thread Rutger Vos
ic num Num +
string  str Str ~

-There are also various reference contexts that require particular kinds of
-container references.
+There are also various container contexts that require particular kinds of
+containers.

=item *

-Unlike in Perl 5, references are no longer always considered true.
+Unlike in Perl 5, objects are no longer always considered true.
It depends on the state of their C<.bit> property.  Classes get to decide
which of their values are true and which are false.  Individual objects
can override the class definition:
@@ -1432,9 +1430,9 @@
There is a "C" operator which imposes a list context on
its arguments even if C itself occurs in a scalar context.
In list context, it flattens lazily.  In a scalar context, it returns
-a reference to the resulting list.  (So the C operator really
-does exactly the same thing as putting a list in parentheses.  But
-it's more readable in some situations.)
+the resulting list as a single C object.  (So the C operator
+really does exactly the same thing as putting a list in parentheses.
+But it's more readable in some situations.)

=item *

@@ -1471,9 +1469,11 @@
Signatures on non-multi subs can be checked at compile time, whereas
multi sub and method call signatures can only be checked at run time
(in the absence of special instructions to the optimizer).
+
This is not a problem for arguments that are arrays or hashes,
since they don't have to care about their context, but just return
-a reference in any event, which may or may not be lazily flattened.
+themselves in any event, which may or may not be lazily flattened.
+
However, function calls in the argument list can't know their eventual
context because the method hasn't been dispatched yet, so we don't
know which signature to check against.  As in Perl 5, list context
@@ -1520,7 +1520,7 @@
=item *

In contrast to assignment, binding to a hash requires a C (or
-C) reference.  Binding to a "splat" hash requires a list of pairs
+C) object.  Binding to a "splat" hash requires a list of pairs
or hashes, and stops processing the argument list when it runs out
of pairs or hashes.  See S06 for much more about parameter binding.


Modified: doc/trunk/design/syn/S05.pod
==
--- doc/trunk/design/syn/S05.pod(original)
+++ doc/trunk/design/syn/S05.podWed Apr  5 19:08:28 2006
@@ -13,9 +13,9 @@

   Maintainer: Patrick Michaud <[EMAIL PROTECTED]>
   Date: 24 Jun 2002
-   Last Modified: 3 Apr 2006
+   Last Modified: 6 Apr 2006
   Number: 5
-   Version: 14
+   Version: 15

This document summarizes Apocalypse 5, which is about the new regex
syntax.  We now try to call them "rules" because they haven't been
@@ -1672,7 +1672,7 @@
 if m:w/ (keep)  | (toss)  / {
 # Each  is in a separate alternation, therefore 
 # is not repeated in any one scope, hence $ is
- # not an array ref...
+ # not an Array object...
 $action = $0;
 $target = $;
 }
@@ -1997,7 +1997,7 @@
/;

 # Aliasing to @ means $/ is always
- # an array reference, so...
+ # an Array object, so...

 say @{$/};

@@ -2152,8 +2152,8 @@
=item *

A hash alias causes the correponding hash or array element in the
-current scope's C object to be assigned a (nested) hash reference
-(rather than an array reference or a single C object).
+current scope's C object to be assigned a (nested) Hash object
+(rather than an Array object or a single C object).

=item *

@@ -2455,7 +2455,7 @@

=item *

-The two sides of each pair may also be array references:
+The two sides of each pair may also be Array objects:

 $str.=trans( ['A'..'C'] => ['a'..'c'],  =>  );




 



--

Rutger Vos, PhD. candidate
Department of Biological Sciences
Simon Fraser University
 University Drive
Burnaby, BC, V5A1S6
Phone: 604-291-5625 
Fax: 604-291-3496

Personal site: http://www.sfu.ca/~rvosa
FAB* lab: http://www.sfu.ca/~fabstar
Bio::Phylo: http://search.cpan.org/~rvosa/Bio-Phylo/





Re: Y [was: "Re: new sigil"]

2005-10-21 Thread Rutger Vos


Speaking of which the advantage of, say, « over << is that the former 
is _one_ charachter. But Y, compared to ¥, is one charachter only as 
well, and is even more visually distinctive with most fonts I know of, 
afaict, so is there any good reason to keep the latter as the 
"official" one?!?



Do you even need to ask? It's because it *looks cool* :)

We need *more* of these. I can't wait until the day when I can finally 
code in overloaded Tagalog or Gujarati:


http://www.iam.uni-bonn.de/~alt/html/unicode_23.html


Re: Book RFC - Migrating to Perl 6

2005-10-15 Thread Rutger Vos
Good idea. A fat new O'reilly tome will go some way to capturing mind share
for perl6. Gathering ideas wiki-style is also very Web2.0. Perhaps perl6
could be marketed as such, what with the development style - "Perl6, the
first Web2.0 programming language".

In any case, if the book comes out around the same time Perl 6.0.0 comes out
there's still plenty of time ;-)

On Fri, 14 Oct 2005 22:11:18 +0200 [EMAIL PROTECTED] wrote:
> I'd like to start by saying "DON'T PANIC! I'm not going to write a
> book on Perl 6" ;-)
> 
> Luckily we have people with much more enlish-fu,
> structured-thought-fu, and general get-it-done-fu... Now let's talk
> a bit about them:
> 
> Today Geoff Broadwell raised a book idea for discussion on #perl6.
> 
> The result was this wiki page:
> 
>   http://pugs.kwiki.org/?MigratingToPerl6
> 
> Essentially Geoff's idea was that the book will come out around the
> same time as Perl 6.0.0, and will be the guide for perl 5
> programmers looking to swallow the Perl 6 pill as easily as
> possible.
> 
> The wiki page illustrates how we think it will be structured, and
> how we think it should be written.
> 
> Please post feedback and criticism on the list, #perl6 or the wiki
> page.
> 
> --
>  ()  Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418  perl hacker &
>  /\  kung foo master: : neeyah!
>