r27305 - docs/Perl6/Spec

2009-06-29 Thread pugs-commits
Author: mvuets
Date: 2009-06-29 11:09:10 +0200 (Mon, 29 Jun 2009)
New Revision: 27305

Modified:
   docs/Perl6/Spec/S02-bits.pod
   docs/Perl6/Spec/S06-routines.pod
   docs/Perl6/Spec/S12-objects.pod
   docs/Perl6/Spec/S17-concurrency.pod
Log:
[Spec] Minor formatting fixes

Modified: docs/Perl6/Spec/S02-bits.pod
===
--- docs/Perl6/Spec/S02-bits.pod2009-06-29 08:22:16 UTC (rev 27304)
+++ docs/Perl6/Spec/S02-bits.pod2009-06-29 09:09:10 UTC (rev 27305)
@@ -2591,7 +2591,7 @@
 STDIN  is also disallowed.)  Empty lists are better written with
 C() or CNil 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{''}.)
+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   .
 

Modified: docs/Perl6/Spec/S06-routines.pod
===
--- docs/Perl6/Spec/S06-routines.pod2009-06-29 08:22:16 UTC (rev 27304)
+++ docs/Perl6/Spec/S06-routines.pod2009-06-29 09:09:10 UTC (rev 27305)
@@ -2619,7 +2619,7 @@
   quasi {  my $COMPILING::new_variable;   my $private_var; ... }
   quasi :COMPILING { my $new_variable; { my $private_var; ... } }
 
-(Note that C:COMPILING has additional effects described in LMacros.) 
+(Note that C:COMPILING has additional effects described in L/Macros.) 
 
 =head1 Other matters
 

Modified: docs/Perl6/Spec/S12-objects.pod
===
--- docs/Perl6/Spec/S12-objects.pod 2009-06-29 08:22:16 UTC (rev 27304)
+++ docs/Perl6/Spec/S12-objects.pod 2009-06-29 09:09:10 UTC (rev 27305)
@@ -223,7 +223,7 @@
 Chas semantics.  So instead of installing a symbol into a lexical
 or package symbol table, they merely install a public or private
 method in the current class or role via calls to its metaobject.
-(Likewise for Csubmethod declarations--see LSubmethods below.)
+(Likewise for Csubmethod declarations--see L/Submethods below.)
 
 Use of an explicit Chas declarator has no effect on the declaration.
 You may install additional aliases to the method in the lexical scope

Modified: docs/Perl6/Spec/S17-concurrency.pod
===
--- docs/Perl6/Spec/S17-concurrency.pod 2009-06-29 08:22:16 UTC (rev 27304)
+++ docs/Perl6/Spec/S17-concurrency.pod 2009-06-29 09:09:10 UTC (rev 27305)
@@ -235,7 +235,6 @@
 development this is a attempt to document working concurrency issues, list the
 remaining todos and mark the probably obsolete and redundant points.
 
-
 =head2 Overview
 
 Concurrency can take many forms in Perl 6.  With varying degrees of
@@ -429,13 +428,10 @@
 from a socket) will cause a fatal error when called inside the call chain
 of an Atomic Code block.
 
-
 =head2 Coroutines
 
 Coroutines are covered in S07
 
-=back
-
 =head2 Threads
 
 All outside of a thread defined variables are



r27312 - docs/Perl6/Spec

2009-06-29 Thread pugs-commits
Author: lwall
Date: 2009-06-30 01:44:51 +0200 (Tue, 30 Jun 2009)
New Revision: 27312

Modified:
   docs/Perl6/Spec/S11-modules.pod
Log:
[S11] some notes on ambiguous authority specs


Modified: docs/Perl6/Spec/S11-modules.pod
===
--- docs/Perl6/Spec/S11-modules.pod 2009-06-29 22:40:43 UTC (rev 27311)
+++ docs/Perl6/Spec/S11-modules.pod 2009-06-29 23:44:51 UTC (rev 27312)
@@ -12,8 +12,8 @@
 
 Created: 27 Oct 2004
 
-Last Modified: 30 Mar 2009
-Version: 28
+Last Modified: 29 Jun 2009
+Version: 29
 
 =head1 Overview
 
@@ -401,6 +401,21 @@
 
 to guarantee that you get the unembraced Perl.  C:-)
 
+When it happens that the same module is available from more than one
+authority, and the desired authority is not specified by the Cuse,
+the version lineage that was created first wins, unless overridden by
+local policy or by official abandonment by the original authority (as
+determined either by the author or by community consensus in case the
+author is no longer available or widely regarded as uncooperative).
+An officially abandoned lineage will be selected only if it is the
+only available lineage of locally installed modules.
+
+Once the authority is selected, then and only then is any version
+selection done; the version specification is ignored until the
+authority is selected.  This implies that all official modules record
+permanently when they were first installed in the official library,
+and this creation date is considered immutable.
+
 For wildcards any valid smartmatch selector works:
 
 use Dog:ver(v1.2.1 | v1.3.4):auth(/:i jrandom/);



r27313 - docs/Perl6/Spec

2009-06-29 Thread pugs-commits
Author: lwall
Date: 2009-06-30 03:58:33 +0200 (Tue, 30 Jun 2009)
New Revision: 27313

Modified:
   docs/Perl6/Spec/S03-operators.pod
   docs/Perl6/Spec/S12-objects.pod
Log:
[S03] make constant have our scoping
[S12] attempt to spec irc conversation with jnthn++


Modified: docs/Perl6/Spec/S03-operators.pod
===
--- docs/Perl6/Spec/S03-operators.pod   2009-06-29 23:44:51 UTC (rev 27312)
+++ docs/Perl6/Spec/S03-operators.pod   2009-06-30 01:58:33 UTC (rev 27313)
@@ -4061,7 +4061,7 @@
 our $foo# lexically scoped alias to package variable
 has $foo# object attribute
 state $foo  # persistent lexical (cloned with closures)
-constant $foo   # lexically scoped compile-time constant
+constant $foo   # our scoped compile-time constant
 
 Variable declarators such as Cmy now take a Isignature as their
 argument.  (The syntax of function signatures is described more fully in S06.)

Modified: docs/Perl6/Spec/S12-objects.pod
===
--- docs/Perl6/Spec/S12-objects.pod 2009-06-29 23:44:51 UTC (rev 27312)
+++ docs/Perl6/Spec/S12-objects.pod 2009-06-30 01:58:33 UTC (rev 27313)
@@ -12,8 +12,8 @@
 
 Created: 27 Oct 2004
 
-Last Modified: 10 Jun 2009
-Version: 85
+Last Modified: 29 Jun 2009
+Version: 86
 
 =head1 Overview
 
@@ -965,14 +965,26 @@
 of the arguments match up with the declared types of the parameters of
 each candidate.  The best candidate is called, unless there's a tie,
 in which case the tied candidates are redispatched using any additional
-tiebreaker long names (see below).
+tiebreaker strategies (see below).  For the purpose of this nominal typing,
+no constrained type is considered to be a type name; instead the constrained 
type
+is unwound into its base type plus constraint.  Only the base type upon
+which the constrained type is based is considered for the nominal type
+match (along with the fact that it is constrained).  That is, if you have a 
parameter:
 
-If a tie still results, only candidates marked with the Cdefault trait are
-considered, and the best matching default routine is used.  If there
-are no default routines, or if the available defaults are also tied,
-a final tie-breaking proto sub is called, if there is one (see above).
-Otherwise the dispatch fails.
+subset Odd of Int where { $_ % 2 }
+multi foo (Odd $i) {...}
 
+it is treated as if you'd instead said:
+
+multi foo (Int $i where { $_ % 2 }) {...}
+
+Any constrained type is considered to have a base type that is epsilon 
narrower than
+the corresponding unconstrained type.  The compile-time topological sort
+takes into account the presence of at least one constraint, but nothing about 
the
+number or nature of any additional constraints.  If we think of Int' as
+any constrained version of Int, then Int' is always tighter nominally than Int.
+(Int' is a meta-notation, not Perl 6 syntax.)
+
 The order in which candidates are considered is defined by a
 topological sort based on the type narrowness of each candidate's
 long name, where that in turn depends on the narrowness of each
@@ -980,12 +992,56 @@
 Parameters whose types are not comparable are also considered tied.
 A candidate is considered narrower than another candidate if at least
 one of its parameters is narrower and all the rest of its parameters
-are either narrower or tied.  This defines the partial ordering of
-all the candidates.  If the topological sort detects a circularity in
-the partial ordering, all candidates in the circle are considered tied.
-A warning will be issued at CCHECK time if this is detected and there is
-no default candidate to fall back to.
+are either narrower or tied.  Also, if the signature has any additional
+required parameters not participating in the long name, the signature
+as a whole is considered epsilon tighter than any signature without
+extra parameters.  In essence, the remaining arguments are added to
+the longname as if the user had declared a capture parameter to bind
+the rest of the arguments, and that capture parameter has a constraint
+that it must bind successfully to the additional required parameters.
+All such signatures within a given rank are considered equivalent,
+and subject to tiebreaker A below.
 
+This defines the partial ordering of all the candidates.  If the
+topological sort detects a circularity in the partial ordering,
+all candidates in the circle are considered tied.  A warning will be
+issued at CCHECK time if this is detected and there is no suitable
+tiebreaker that could break the tie.
+
+There are three tiebreaking modes, in increasing order of desperation:
+
+A) run-time constraint processing
+B) use of a candidate marked with is default
+C) use of a candidate marked as proto
+
+In the absence of any constraints, ties in the nominal typing
+immediately failover to 

Re: r27312 - docs/Perl6/Spec

2009-06-29 Thread Darren Duncan

pugs-comm...@feather.perl6.nl wrote:

+When it happens that the same module is available from more than one
+authority, and the desired authority is not specified by the Cuse,
+the version lineage that was created first wins, unless overridden by
+local policy or by official abandonment by the original authority (as
+determined either by the author or by community consensus in case the
+author is no longer available or widely regarded as uncooperative).
+An officially abandoned lineage will be selected only if it is the
+only available lineage of locally installed modules.
+
+Once the authority is selected, then and only then is any version
+selection done; the version specification is ignored until the
+authority is selected.  This implies that all official modules record
+permanently when they were first installed in the official library,
+and this creation date is considered immutable.
+
 For wildcards any valid smartmatch selector works:
 
 use Dog:ver(v1.2.1 | v1.3.4):auth(/:i jrandom/);


So now you've explicitly stated what I implicitly (or maybe explicitly) thought 
before, in that version numbers are always subordinate to authorities, and only 
make sense in the context of an authority, though an explicit authority doesn't 
have to be declared in user code.


I propose that the canonical order of entity long names be altered so that the 
:auth always comes first, and :ver second, when both are used.


For example:

use Dog:auth(/:i jrandom/):ver(v1.2.1 | v1.3.4);

The documentation should be in that order, not the other order.  Then I think 
the syntax better corresponds to the actual interpretation, conceptually where 
each new trait (or trait-looking thing) is interpreted in the context of those 
before it.  And I don't just mean example code, but explanation order too.


-- Darren Duncan