In Perl6/Spec/Operator.pod
Trinary should be Ternary.
Mark
In S12, we see a number examples of:
class Dog is Mammal
http://dev.perl.org/perl6/doc/design/syn/S12.html
However, it's not clear if it is necessary to preload Mammal for Dog
to function properly here, or what that syntax would be.
Testing with current version of pugs, this doesn't
I noticed in pugs, 'ref' does not return 'HASH' and 'ARRAY' as Perl5
does, but returns values including 'Hash', 'Array' and 'Array::Const'.
I don't find meaningful mentions of 'HASH' and 'ARRAY' by grep'ing
docs/Perl6 (or even ref!), so I wanted to check in here about the
meaningfulness of this
Perl6::Spec::Documentation is a draft spec for documentation formats for
use with Perl6.
My own reading of it is that POD still exists and is supported, while a
new wiki-like format kwid is added, and a framework for various
dialects is supported.
POD was successful for its simplicity. It was
I'm interested in helping to write some tests for return types, but
I'd like some clarifications about them first. Are they just
declarations that help Perl optimize stuff, or they actually contracts?
As this little script shows, both inner and of are valid syntax now
with pugs, but neither is
Regarding The S06 description of named arguments:
http://feather.perl6.nl/syn/S06.html#Named_arguments
What I find missing here is documentation of the signature to use
if you want to declare I accept an arbitrary number of named
arguments. (Like the param() methods common in Perl5 do).
Maybe
Trey Harris wrote:
Slurpy parameters follow any required or optional parameters. They are
marked by a C* before the parameter:
sub duplicate($n, *%flag, [EMAIL PROTECTED]) {...}
Named arguments are bound to the slurpy hash (C*%flag
in the above example). Such arguments
Sometimes I use 'given' blocks to set a value. To save repeating myself
on the right hand side of the given block, I found I kept want to do this:
my $foo = given { }
...and have whatever value that was returned from when {} or default {}
populate $foo.
It turns out pugs already allow this,
Agent Zhang wrote:
According to S04, given {} is at statement level, so you can't use it
directly as an expression. But Perl 6 always allow you to say
my $foo = do given {...}
As well as
my $foo = do if foo {...} else {...}
I confirmed this both work now with pugs!
I think the
In reading about symbolic references, I didn't find any specific
language that mentioned using them in conjunction with methods or OO. I
would like to see specific language and examples added to the spec to
clarify this.
Here's a specific example which currently doesn't work in pugs.
It's
Mark Stosberg wrote:
::($meth)(self:);
Well, audreyt just made this work (r12960), which I what I what
I thought should work in the first place:
self.$meth().
So I'm happy. (But my curiosity about the spec for symbolic refs and OO
still stands. )
Mark
Hello,
I think it would helpful if the spec addressed who wins in MMD when
optional arguments are present.
I just submitted these failing tests for pugs which illustrate the
issue.
not ok 11 - Arguments (a = 'b') to signatures 1. () and 2. (*%h) calls 2
not ok 14 - Arguments () to signatures 1.
Mark Stosberg wrote:
Hello,
I think it would helpful if the spec addressed who wins in MMD when
optional arguments are present.
I just submitted these failing tests for pugs which illustrate the
issue.
not ok 11 - Arguments (a = 'b') to signatures 1. () and 2. (*%h) calls 2
not ok 14
Mark Stosberg wrote:
Hello,
I think it would helpful if the spec addressed who wins in MMD when
optional arguments are present.
I just submitted these failing tests for pugs which illustrate the
issue.
not ok 11 - Arguments (a = 'b') to signatures 1. () and 2. (*%h) calls 2
not ok 14
S12 describes a feature to call sets of methods at the same time:
http://feather.perl6.nl/syn/S12.html#Calling_sets_of_methods
I would like the spec to clarify what happens to the return values of
all these methods.
I'm fine with a simple answer, such as that they are not available, or
only
Luke Palmer wrote:
I don't follow your examples. What is the logic behind them?
On 9/3/06, Mark Stosberg [EMAIL PROTECTED] wrote:
Examples:
Arguments (1 2) to signatures 1. (@a?) and 2. (@a) calls 2
For example, I would expect this one to be ambiguous, because the 1.
(@a?) sub
Mark Stosberg wrote:
S12 describes a feature to call sets of methods at the same time:
http://feather.perl6.nl/syn/S12.html#Calling_sets_of_methods
I would like the spec to clarify what happens to the return values of
all these methods.
I'm fine with a simple answer
In the Objects chapter, a WALK pseudo-class is spec'ed for using
when calling sets of methods:
http://feather.perl6.nl/syn/S12.html#Calling_sets_of_methods
These are the arguments listed that can be used with WALK:
:canonical # canonical dispatch order
:ascendant #
Brad Bowman wrote:
Mark Stosberg wrote:
In the Objects chapter, a WALK pseudo-class is spec'ed for using
when calling sets of methods:
http://feather.perl6.nl/syn/S12.html#Calling_sets_of_methods
These are the arguments listed that can be used with WALK:
:canonical # canonical
I found 6 references to gather in Perl6/Spec/*, but none of them were
a formal definition.
It would great if an official entry for gather/take could be added.
Mark
Trey Harris wrote:
markstos++ pointed out the following behavior:
use v6-alpha;
{
when 1 ~~ 0 {
say Surprise!
}
}
This code prints Surprise!, because $_ is undef, which is false, just
like 1 ~~ 0 is.
I'd like to make the following suggestions for Synopsis
I'll hold up some error handling in CGI::Application as use case some
for some CATCH spec refinements. The Perl 5 code is below for reference.
First, we handle the exception conditionally based /not/ on the
exception itself, but whether we have an exception handle installed
to deal with it. Is it
The formal definition of Inf appears to be missing from the spec
documents. Since I'm not exactly sure how Perl 6 treats Inf, I'll
leave submitting this patch to someone else.
Once the spec is added, a smart link to it should be added from:
t/builtins/math/infinity.t
Mark
Mark Stosberg wrote:
The formal definition of Inf appears to be missing from the spec
documents. Since I'm not exactly sure how Perl 6 treats Inf, I'll
leave submitting this patch to someone else.
Once the spec is added, a smart link to it should be added from:
t/builtins/math/infinity.t
Mark Stosberg wrote:
The formal definition of Inf appears to be missing from the spec
documents. Since I'm not exactly sure how Perl 6 treats Inf, I'll
leave submitting this patch to someone else.
Once the spec is added, a smart link to it should be added from:
t/builtins/math/infinity.t
Larry Wall wrote:
I'm trying to decide if
sub ($self: $just_a_named_param)
can meaningfully put anything into $self. It seems doubtful, and it should
probably be
submethod ($self: $just_a_named_param)
I agree. If
sub ($self: $foo)
works than it reduces privacy, since
Hello,
As I've worked on smart linking, I've found some gaps in the spec, often
of the variety of obvious parts that should largely work the same as
Perl 5. For example, say was formally spec'ed until recently, or
print for that matter.
I have a suggestion which I believe make the docs more
Darren Duncan wrote:
Putting aside legacy issues for the moment,
I suggest that it might be appropriate to rename the .grep list operator
to .where, so we can say, for example:
@filtered = @originals.where:{ .foo eq $bar };
We already have a where keyword in the language, which is
Mark J. Reed wrote:
Ok, I dkimmed through the synopses again and didn't see this offhand.
If I have two arrays @a and @b and I wish to create a two-element list
out of them - a la Perl5 ([EMAIL PROTECTED], [EMAIL PROTECTED]) - what's the
correct way to do
that in Perl6? If it's still
Brad Bowman wrote:
Both Data::Dumper and Storable provide hooks to customize serialization
($Data::Dumper::Freezer|Toaster, STORABLE_freeze|_thaw).
Other modules like YAML and Clone could also possibly reuse a
common state marshalling interface.
Is there some common element to this
30 matches
Mail list logo