Re: r24769 - docs/Perl6/Spec

2009-01-05 Thread Brandon S. Allbery KF8NH

On 2009 Jan 5, at 11:54, pugs-comm...@feather.perl6.nl wrote:

+ our Str multi method perl (Object $o)
+
+Returns a perlish representation of the object, so that calling  
Ceval

+on the returned string reproduces the object as good as possible.


My inner English teacher cringes in pain.  It should be accurately,  
or possibly completely; good just doesn't fit there.


--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com
system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu
electrical and computer engineering, carnegie mellon universityKF8NH




Re: r24769 - docs/Perl6/Spec

2009-01-05 Thread Tim Bunce
On Mon, Jan 05, 2009 at 05:54:50PM +0100, pugs-comm...@feather.perl6.nl wrote:
 Author: moritz
 Date: 2009-01-05 17:54:50 +0100 (Mon, 05 Jan 2009)
 New Revision: 24769

 +=item can
 +
 + our Bool multi method can ($self:, Str $method)
 +
 +If there is a multi method of name C$method that can be called on
 +C$self, then closure is return has C$self bound to the position
 +of the invocant.
 +
 +Otherwise an undefined value is returned.

then closure is return has ?
perhaps: then the closure that is returned has ?

If it returns a closure then isn't Bool the signature wrong?

Before someone 'fixes' that, though, couldn't can() just return a Bool,
and move the 'give me a closure' to another method?

Ignoring the performance cost of needlessly creating closures
for simple boolean usage, 'can' doesn't seem like a good name for
a 'give me a closure' method.

 +=item clone
 +
 + our multi method clone (::T $self -- T)
 + our multi method clone (::T $self, *%attributes -- T)
 +
 +The first variant retuns  an independent copy of C$o that is equivlant
 +to C$o.

typos variant returns and equivalant

 +The second variant does the same, but any named arguments override an
 +attribute during the cloning process.

perhaps: any named arguments are applied to $self as attributes,
overriding any attributes with the same names. Makes it clearer that
the attributes aren't applied to nested elements.

 +=item isa
 +
 + our Bool multi method isa ($self:, $type)
 +
 +Returns true if a the invocant an instance of class C$type, or 

typos Returns CTrue if the invocant is an instance ...

Tim.