On 11/8/05, Gaal Yahas <[EMAIL PROTECTED]> wrote:
> Wouldn't it be nice to be able to supply default values for instance
> variables right in the attribute declaration?
>
> class Jabberwock {
> has $.jaws = "bite";
> has $.claws = "catch";
> }
>
> my $scary = Jabbe
On 11/8/05, Gaal Yahas <[EMAIL PROTECTED]> wrote:
> On Tue, Nov 08, 2005 at 07:07:42PM +0000, Luke Palmer wrote:
> > > class Jabberwock {
> > > has $.jaws = "bite";
> > > has $.claws = "catch";
> > > }
Just some initial thoughts and syntax issues. I'll come back to it on
the conceptual side a little later.
On 11/10/05, Jonathan Lang <[EMAIL PROTECTED]> wrote:
>
> class complexRectilinear {
> has $.x, $.y;
Hmm, that might need to be
has ($.x, $.y);
However, inlining "has"s isn't possibl
On 11/15/05, Aaron Sherman <[EMAIL PROTECTED]> wrote:
> This question came out of a joking comment on IRC, but it's a serious
> concern. Can chained buts be optimized, or must the compiler strictly
> create intermediate metaclasses, classes and objects in the following:
>
> my $a = $b but C
Here is some perplexing behavior:
say "Foo";
hello there;
sub hello () {
say "Bar";
}
sub there () {
say "Baz";
}
This prints:
Foo
*** No compatible subroutine found: "&hello"
at lazy.p6 line 2, column 1-12
I would expect it to print:
On 11/16/05, Luke Palmer <[EMAIL PROTECTED]> wrote:
> Here is some perplexing behavior:
>
> say "Foo";
> hello there;
>
> sub hello () {
> say "Bar";
> }
>
> sub there () {
> say "Baz";
&g
On 11/17/05, Joshua Choi <[EMAIL PROTECTED]> wrote:
> But what does that mean for =>'s signature? What type would be its
> first parameter? Would you call it "&infix:{'=>'}:(Bareword | Any,
> Any)" or something like that? And in any case, would you be able to
> use this autoquoting in or as a sub,
On 11/20/05, Ingo Blechschmidt <[EMAIL PROTECTED]> wrote:
> sub foo (*@;AoA) { @;AoA }
>
> my @array1 = ;
> my @array2 = ;
>
> my @AoA = foo @array1, @array2;
> say [EMAIL PROTECTED]; # 2?
1
> say [EMAIL PROTECTED]; # a b c?
a b c d e f
However,
my @AoA = foo(@
On 11/21/05, Ingo Blechschmidt <[EMAIL PROTECTED]> wrote:
> Hm. How is (*@;AoA) different from (Array [EMAIL PROTECTED]) then? (Assuming
> that
> foo(@a; @b) desugars to foo([EMAIL PROTECTED], [EMAIL PROTECTED]).)
Well, it's not at all, under that assumption. But that assumption is
wrong. I thi
On 11/21/05, Ingo Blechschmidt <[EMAIL PROTECTED]> wrote:
> Of course, the compiler is free to optimize these things if it can prove
> that runtime's &statement_control: is the same as the internal
> optimized &statement_control:.
Which it definitely can't without some pragma.
I wonder if they sh
On 11/23/05, Rob Kinyon <[EMAIL PROTECTED]> wrote:
> On 11/22/05, Larry Wall <[EMAIL PROTECTED]> wrote:
> >
> > for ^5 { say } # 0, 1, 2, 3, 4
>
> I read this and I'm trying to figure out why P6 needs a unary operator
> for something that is an additional character written the more legible
> w
On 11/22/05, Damian Conway <[EMAIL PROTECTED]> wrote:
> :syntax
> :syntax
> :syntax
> :syntax
> :syntax
> :syntax
Aren't we providing an interface to define your own regex modifiers?
All of these can easily be mapped into Perl 6 patterns, so...
Modules welcome! ;-)
On 11/23/05, Damian Conway <[EMAIL PROTECTED]> wrote:
> Luke wrote:
>
> > On 11/22/05, Damian Conway <[EMAIL PROTECTED]> wrote:
> >
> >> :syntax
> >> :syntax
> >> :syntax
> >> :syntax
> >> :syntax
> >> :syntax
> >
> >
> > Aren't we providing an interface to define your own r
On 11/23/05, Larry Wall <[EMAIL PROTECTED]> wrote:
> Basically, we're attaching the whole lazy/nonlazy mess to the
> list/scalar distincion, which I think is a really good default.
> We use ** and lazy() to violate those defaults.
I think you might be mixing up the "scope" of laziness here. Havin
Hi Jerry,
I'm just curious, I don't mean to criticize your ideas. Just, give
some "why"s for the "should"s.
On 11/29/05, jerry gay <[EMAIL PROTECTED]> wrote:
> the parrot directory structure is large and a bit disorganized.
> let me give you some examples:
> * build_tools/, util/, and tools/*/ e
On 12/2/05, jerry gay <[EMAIL PROTECTED]> wrote:
> i'm afraid adding tracing info will bring either system to its knees.
> perhaps there's some other way for me to help debug?
Okay, I haven't looked into the source at all, but I have one theory:
If Punie now uses Allison's attribute grammar imple
On 12/5/05, Gaal Yahas <[EMAIL PROTECTED]> wrote:
> There's a bikeshedding question of some visibility: now that we have a
> C builtin, what do we do with C?
Is it possible to do nothing with it? That is, can we coerce the Test
module to understand when the main program "fail"s? This may be
prob
On 12/5/05, Darren Duncan <[EMAIL PROTECTED]> wrote:
> Under the current system, a subroutine argument is an alias for the
> container passed to it;
The most immediate offender here is the referential passing semantics.
Here is a code case:
sub foo ($x, &code) {
&code();
say
On 12/6/05, chromatic <[EMAIL PROTECTED]> wrote:
> On Mon, 2005-12-05 at 07:54 +0000, Luke Palmer wrote:
>
> > I wonder if there is a macroey thing that we can do here. That is,
> > could we make:
> >
> > ok(1);
> > is(1, 1);
> > li
On 12/6/05, Luke Palmer <[EMAIL PROTECTED]> wrote:
> That still leaves the problem of what to do with fail() and is() in
> the compiler suite.
>
> Here's a handwavey crack at what I was talking about:
Ack. Accidentally sent the half written message. Let's try again
On 12/11/05, Bryan Burgers <[EMAIL PROTECTED]> wrote:
> I was wondering... Are there plans to have parrot securely execute
> remote code, similar to JVM, so a person can have a parrot plug-in in
> their browser (for example), and run parrot 'applets' with the
> confidence that they are safe?
> Or i
On 12/15/05, Darren Duncan <[EMAIL PROTECTED]> wrote:
> I propose, perhaps redundantly, that Perl 6 include a complete set of
> native
Okay, I'm with you here. Just please stop saying "native" and "core".
Everyone.
Remember, syntax in Perl 6 can be stuffed in a library like anything
else. You
On 12/15/05, Gaal Yahas <[EMAIL PROTECTED]> wrote:
> What should this mean?
>
> package Foo;
> sub Bar::baz is export { ... }
>
> The problem is in how callers request this export.
>
> use Foo ;
Hmm. My gut reaction is that that is the correct way to request that export.
> Looks w
On 12/15/05, Brad Bowman <[EMAIL PROTECTED]> wrote:
> Why does the longest input sequence win?
>Is it for some consistency that that I'm not seeing? Some exceedingly
> common use case? The rule seems unnecessarily restrictive.
Hmm. Good point. You see, the longest token wins because that's
On 12/17/05, Darren Duncan <[EMAIL PROTECTED]> wrote:
> An undefined value is NOT the same as zero or an empty string
> respectively; the latter two are very specific and defined values,
> just like 7 or 'foo'.
I definitely agree with you in principle. This is something that has
been bugging me,
Recently, I believe we decided that {} should, as a special case, be
an empty hash rather than a do-nothing code, because that's more
common.
However, what do we do about:
while $x-- && some_condition($x) {}
Here, while is being passed a hash, not a do-nothing code. Should we
force people t
On 12/22/05, Michele Dondi
> Please do not ask me what I have in mind, for I'm
> not really sure.
Well, @Larry has been researching attribute grammars for a month or
two now, which are an efficient (programmer-wise, not necessarily
processor-wise) method for specifying computations over trees. Th
On 12/23/05, Peter Schwenn <[EMAIL PROTECTED]> wrote:
> Perl6'ers
>
> Is the "best" (most complete as to Perl6 Language) current setup (for
> experimenting with Perl6 source code) currently a hybrid: Pugs with
> embedded Parrot, or is it Perl5 with a large set of Perl6'ish modules.
> Or something e
The following causes PGE to infinite loop:
"x" ~~ /[ [ x ]* ]*/
Luke
What sort of match object should this return, supposing that it didn't
infinite loop:
"x" ~~ / [ [ (x) ]* ]* /
Should $/[0][0] be "x", or should $/[0][0][0] be "x"? If it's the
latter, then when do new top-level elements get added?
/
[
[
{ say +$/[0][] } # is thi
Does .clone do deep or shallow copying of objects?
I'm going to argue for shallow. I know there's a obvious tendency to
say that we should go with deep, because it's useful sometimes.
However, I think that would be ignoring the amazing prevelance of the
shallow copy idioms in perl 5:
[ @arr
On 12/23/05, Juerd <[EMAIL PROTECTED]> wrote:
> Luke Palmer skribis 2005-12-23 16:16 (+):
> > However, I think that would be ignoring the amazing prevelance of the
> > shallow copy idioms in perl 5:
> > [ @array ]
> > { %hash }
>
> It's a gr
On 12/23/05, TSa <[EMAIL PROTECTED]> wrote:
> HaloO Everybody,
>
> here's a an idea from me about makeing range object a bit like
> junctions. That is a range object has a $.min and $.max and the
> following comparison behaviour:
>
> str num
>
> lt < strictly inside -+
> gt > stri
On 12/25/05, Juerd <[EMAIL PROTECTED]> wrote:
> foo(
> named_arg := $value,
> other_arg := $value,
> );
I'll point out that Joe's argument is completely moot, because you're
not using $s on the named arguments. As a matter of fact, we could
double up the := symbol as both
On 12/26/05, Patrick R. Michaud <[EMAIL PROTECTED]> wrote:
> On Fri, Dec 23, 2005 at 02:09:19PM +0000, Luke Palmer wrote:
> > "x" ~~ / [ [ (x) ]* ]* /
>
> As I understand things, $/[0][0] would be "x".
Hmm, that seems wrong. Consider:
"xxx
On 12/26/05, Patrick R. Michaud <[EMAIL PROTECTED]> wrote:
> > I argue that by the structure of that rule, you should be able to tell
> > which xs go with which y.
> > ...
> > Is there a counterargument that I'm not seeing?
>
> I'd say that if you want a structured rule, it should be written
> that
On 12/28/05, Sastry <[EMAIL PROTECTED]> wrote:
> I am looking for the latest Perl6 source code. Could somebody give me
> a link to the same?
> Do we need to install parrot before we install perl6?
You can check out the latest code at:
http://svn.openfoundry.org/pugs
You'll need ghc-6.4 or la
I propose that we change $! (formerly global) and $/ (formerly
implicitly lexical) to being env variables. Here is the IRC
conversation where Audrey convinced me:
http://colabti.de/irclogger/irclogger_log/perl6?date=2006-01-01,Sun&sel=1213#l1893
Let me explain env variables, because my misunderst
Recursive descent is slow, and it produces bad error messages unless
you are very careful with your calls, but it is very flexible
and (locally) predictable. Predictive parsing is faster and produces
fantastic error messages, and is fairly flexible. Bottom up parsing
is very flexible, but is ver
On 1/2/06, TSa <[EMAIL PROTECTED]> wrote:
> But I have no idea for this nice syntax, yet. Perhaps something like
>
>my &junc = any(1,2,3);
>my $val = 1;
>
>if junc( &infix:<==>, $val ) {...}
>
> which is arguably clumsy.
I don't think anyone would waste his time arguing that. :-)
> T
On 1/4/06, Jonathan Lang <[EMAIL PROTECTED]> wrote:
> > And I'm almost sure that I agree with him. It's too bad, because
> > except for that little "detail", fmap was looking pretty darn nice for
> > junctions.
>
> Not really. If I read the fmap proposal correctly,
You didn't :-)
> if any($x,
On 1/4/06, Rob Kinyon <[EMAIL PROTECTED]> wrote:
> Luke Palmer wrote:
> > The point was that you should know when you're passing a named
> > argument, always. Objects that behave specially when passed to a
> > function prevent the ability to abstract uniformly us
On 1/9/06, Gaal Yahas <[EMAIL PROTECTED]> wrote:
>sub use_ok($module) {
>eval "package {caller.package}; require etc.";
>}
I'd like to see a nice interface to scopes in general. That is, we
would have a "scope object" which would provide access to all the
lexical scopes and the pa
On 1/12/06, Jonathan Lang <[EMAIL PROTECTED]> wrote:
> I think that Dave has a point about a Range[Real] being an infinite
> set: According to DWIM, if I see "4.5..5.7", I don't think of "4.5,
> 5.5"; I think of "numbers greater than or equal to 4.5 but less than
> or equal to 5.7". Likewise, "4.5
On 1/13/06, Dave Whipp <[EMAIL PROTECTED]> wrote:
> I'm trying to work out if there's a clever perl6 way to write this using
> pattern matching:
>
>for @*ARGV -> "-f", $filename {
> $filename .= absolute_filename;
>}
There is, but it's a different kind of pattern matching:
if @*A
In perl 5:
my @a = (1,2,3);
delete $a[1];
print exists $a[1];
This is false, whereas $a[0] and $a[2] do exist. This is creepy. Not
only is it creepy, it raises a whole bunch of questions with
nontrivial answers:
* does [EMAIL PROTECTED] include nonexistent elements?
* does
On 1/13/06, Dave Whipp <[EMAIL PROTECTED]> wrote:
> What happens if I simply abandon the attempt at anonymous MMD and use a
> named multi-sub, instead:
>
> {
>my multi sub process_arg("-f", Str $f is rw) {
> $f .= absolute_filename
>}
>my multi sub process_arg("--quux", Str arg1,
On 1/17/06, Audrey Tang <[EMAIL PROTECTED]> wrote:
> I personally like having 0/0 be NaN and 1/0 be Inf (as in JavaScript),
> but all of Python/Perl/Ruby/Scheme/OCaml throws exceptions for them...
I believe we've been through this before. We go with a standard,
probably IEEE, horridly mathematica
On 1/19/06, Joe Gottman <[EMAIL PROTECTED]> wrote:
>Suppose I have code that looks like this:
>
> my ($x, $y, $z) = (1, 2, 3);
>
> say "sorted backward" if ++$x > ++$y > ++$z;
>
>
>
> Will $z be incremented even though the chained comparison is known to be
> false after
On 1/19/06, Rob Kinyon <[EMAIL PROTECTED]> wrote:
> OOP is all about black-box abstraction. To that end, three items have
> been identified as being mostly necessary to achieve that:
> 1) Polymorphism - aka Liskov substitutability
> 2) Inheritance - aka specialization
> 3) Encapsulation
On 1/29/06, Darren Duncan <[EMAIL PROTECTED]> wrote:
> ghc 6.4.0 works only with gcc 3.3, so those people that get 4.0 by
> default will have to downgrade to work with 6.4.0.
Wait---so if your proposal isn't effected, then people will be unable
to upgrade to ghc 6.4.1, and will instead have to dow
On 1/29/06, jesse <[EMAIL PROTECTED]> wrote:
> What's the benefit of bumping the ghc dependency up?
Well, if it helps, ghc-6.4.1 was a bugfix release from ghc-6.4.0, so
we're not getting any new features.
Luke
On 1/29/06, Yuval Kogman <[EMAIL PROTECTED]> wrote:
> Aside from that they are normal perl 6 subroutines, that simply get
> invoked during compile time instead of during runtime.
With one extra "feature". By default (my preference) or with a trait,
parameters can get passed in as ASTs instead of
On 2/3/06, Dave Whipp <[EMAIL PROTECTED]> wrote:
>sub factorial(Int $x) {
>temp state Int $result = 1;
>$result *= $x;
>factorial $x-1 if $x > 2;
>return $result if want;
>}
>say factorial 6;
That's precisely what "env" variables are for. The right way:
On 2/6/06, Larry Wall <[EMAIL PROTECTED]> wrote:
> This is mostly motivated by linguistics rather than computer science,
> insofar as types/classes/roles in natural language are normally
> represented by generic objects rather than "meta" objects. When I
> ask in English:
>
> Can a dog bark?
>
On 2/7/06, Larry Wall <[EMAIL PROTECTED]> wrote:
> $MY::{'x y'}
> $MY:: # same thing
> MY::<$x y> # same thing
Er, aren't we obscuring the meaning of <> a little bit here? I would
think that the following two things would be equivalent:
$My::
$My::{'x','y'}
On 2/7/06, Robin Houston <[EMAIL PROTECTED]> wrote:
> Any undef undefinedmatch if !defined $a
> Any Regex pattern matchmatch if $a =~ /$b/
> Code() Code()results are equalmatch if $a->() eq $b->()
> Any Code()simple cl
On 2/13/06, Juerd <[EMAIL PROTECTED]> wrote:
> Luke Palmer skribis 2006-02-13 9:36 (+):
> > That's a compile time error. Both "has" declarations generate a
> > method "a", so it is a method conflict.
>
> Doesn't normally double decl
On 2/13/06, Yiyi Hu <[EMAIL PROTECTED]> wrote:
> For perl 6,
> Array and Scalar are in different namespace.
> So,
> class A { has $.a; has @.a };
>
> what will A.new.a return by default?
That's a compile time error. Both "has" declarations generate a
method "a", so it is a method conflict.
Luke
On 2/13/06, Amos Robinson <[EMAIL PROTECTED]> wrote:
> I think there's a typo in synopsis 5, "Indirectly quantified subpattern
> captures:"
> [ (\w+) \: (\w+ \h+)* \n ]**{2...}
> I have a feeling the \h should be *, not +.
It looks like you're right. Thanks, fixed.
Luke
On 2/14/06, David Romano <[EMAIL PROTECTED]> wrote:
> ==Question 1==
> macro rxmodinternal: { ... } # define your own /:x() stuff/
> macro rxmodexternal: { ... } # define your own m:x()/stuff/
> With this, I can make my own adverbs then? Like :without, or :skip, and
> describe what each does?
Yes,
On 2/24/06, Damian Conway <[EMAIL PROTECTED]> wrote:
> No. One of the available TRAITS is C. So you can always
> specify a "postfix" return type, even without a declarator:
>
> sub data() returns Str {...}
>
> The declarator is only needed if you want to "prefix" your return type
> (presuma
On 3/12/06, Premshree Pillai <[EMAIL PROTECTED]> wrote:
> On 3/13/06, Yuval Kogman <[EMAIL PROTECTED]> wrote:
> > Paste code / errors?
>
> I have this bit of code:
>
> my $tree = XML::Parser::Lite::Tree::instance()->parse($xml_data);
>
> And following's the error Pugs throws out:
>
> unexpe
On 3/13/06, Premshree Pillai <[EMAIL PROTECTED]> wrote:
> On 3/13/06, Luke Palmer <[EMAIL PROTECTED]> wrote:
> > Well, yeah. Just because you're using a Perl 5 module doesn't mean
> > you use Perl 5 syntax.
> >
> > my $tree = XML::Parser::Li
On 4/3/06, Amos Robinson <[EMAIL PROTECTED]> wrote:
> This is perl 6, right?
> my %hash; $hash{foo}{bar} - shouldn't it be %hash{foo}{bar}?
%hash even.
Luke
On 4/4/06, Larry Wall <[EMAIL PROTECTED]> wrote:
> On the other hand, if junctions really are sets of sets, then maybe it's
> a mistake to autocoerce junctions to sets by swiping their internal set
> of values. Arguably any(1,2,3) should coerce not to
>
> (1,2,3)
>
> but to
>
> (
>
On 4/4/06, Jonathan Lang <[EMAIL PROTECTED]> wrote:
> OK, then; what would be the specification for a _single_ set that
> contains everything that doesn't intersect with a corresponding all()
> Junction (the sort of thing that I'd use if I wanted to find the
> largest subset of A that doesn't inter
On 3/27/06, Larry Wall <[EMAIL PROTECTED]> wrote:
> The p5-to-p6 translator will turn
>
> local $x;
>
> into
>
> temp undefine $x;
Are you sure that that's not:
undefine temp $x;
It seems to me that the other way would undefine $x and then temporize it.
Luke
On 4/28/06, Larry Wall <[EMAIL PROTECTED]> wrote:
How about Bag, a set container? Alternately what we really want is
just a Hash where the type of the value is defined as 1, so it need
not be stored at all. Then most of the syntax for it just falls out
of Hash syntax, unless you like writing $x
On 8/8/06, Yuval Kogman <[EMAIL PROTECTED]> wrote:
The way it could work is a bit like this:
class Mail::TheOneTrueWay {
does Mail::SomeAPI is weak {
method header; # this method has different semantics for
# each role. It w
On 8/8/06, Yuval Kogman <[EMAIL PROTECTED]> wrote:
On Tue, Aug 08, 2006 at 11:12:11 +0100, Daniel Hulme wrote:
> I may be in a little world of my own here, but isn't this what 'as' is
> supposed to do?
>
> foo($x as Moose);
as is a method invocation not a type annotation... It's related, but
no
On 8/8/06, Yuval Kogman <[EMAIL PROTECTED]> wrote:
I personally prefer delegates for almost any design dillema, but
most CPAN modules aren't that way.
Well, what way are they? How else has this problem been solved?
Yes, this is necessary for anything heavyweight and probably better
design,
On 8/8/06, Yuval Kogman <[EMAIL PROTECTED]> wrote:
It's much more relevant for:
fun( $x.foo :: Bar );
in order to annotate the return type for a call's context even if
the 'fun' function's signature accepts Any.
Touche, this is independent of type inference.
I'm not up-to-date on coe
On 8/8/06, Yuval Kogman <[EMAIL PROTECTED]> wrote:
My original idea was that this is again an ambiguity error - without
the helper function stating which role it's using it cannot dispatch
the "header" method at all, since it's in a role-conflicted state.
The difference, though, is that this am
On 8/10/06, Larry Wall <[EMAIL PROTECTED]> wrote:
Yes, it's a design smell. The point of core is to huffman code common
things, so something in core with _ should normally either be shorter
or out of the core.
I don't think I agree. I've been programming in Ruby, and I
appreciate all the nice
On 8/11/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Some object types can behave as value types. Every object can produce
a "safe key identifier" (C for short) that uniquely identifies the
-object for hashing and other value-base comparisons. Normal objects
+object for hashing and other
What do these do?
for 1,2 {
my $code = {
my $x;
BEGIN { $x = 42 }
$x;
};
say $code();
}
for 1,2 {
my $code = {
state $x;
BEGIN { $x = 42 } # mind you, not FIRST
$x++;
};
say $code();
say $code();
}
fo
On 8/16/06, Larry Wall <[EMAIL PROTECTED]> wrote:
: Is the output 01234 or 12345?
I'd say 01234 on the theory that the 3-arg loop is really saying:
$n = 0;
while $n < 5 {
NEXT { ++$n }
NEXT { print $n }
}
and also on the theory that block exiting blocks always run i
On 8/17/06, Jonathan Scott Duff <[EMAIL PROTECTED]> wrote:
Depends on when it fires I guess. Your example might be equivalent to
this perl5ish:
while (1) {
$num = rand;
print $num;
last if $num < 0.9;
print ","; # NEXT
}
print "\n";
On 8/19/06, Aaron Crane <[EMAIL PROTECTED]> wrote:
You don't actually need a macro in that case:
if 0 { q<
...
> }
Which, of course, eliminates the original desire to have a
code-commenting construct where "you just change the 0 to a 1". After
all, we already have #{}. Incide
On 8/20/06, Andrew Suffield <[EMAIL PROTECTED]> wrote:
On Sun, Aug 20, 2006 at 10:50:31AM -1000, Joshua Hoblitt wrote:
> > #{
> >if $baz {
> >$foo.bar
> >}
> > }
> >
> > To uncomment, remove the # before the {.
>
> This is exactly the type of construct that I had in mind. A coupl
On 8/20/06, Luke Palmer <[EMAIL PROTECTED]> wrote:
Well, I think you are being too picky.
[snip snarky sarcastic rant]
Hmm, perhaps I'm feeling edgy. Or maybe some of the comments reminded
me of those rediculously long, whiny threads. Anyway, that was
un-called-for.
Luke
On 8/22/06, Larry Wall <[EMAIL PROTECTED]> wrote:
print qq:from/FOO/;
On a somewhat related, somewhat unrelated note, I am a little bit
worried about the false duality of :to and :from.
Luke
On 8/23/06, Larry Wall <[EMAIL PROTECTED]> wrote:
you really want:
if $a ~~ Array {
and that also matches Array::Const, assuming it's derived from Array.
Well, actually Array would be a subtype of Array::Const, not t'other
way round. That is a little bit disconcerting, because when you s
On 8/23/06, Larry Wall <[EMAIL PROTECTED]> wrote:
Yes, that should work eventually, given that hypers are supposed to stop
after the longest *finite* sequence.
Shudder xx *
What the hell does that mean!?
Let me posit this:
@a = 0..42;
@b = list_of_twin_primes();
(@a >>=><< @b).lengt
On 8/24/06, Mark J. Reed <[EMAIL PROTECTED]> wrote:
I found your rant a bit long on vehemence and short on coherence,
Luke, but if I understand you correctly, your complaint is that this
is finite:
@finite_list >>=><< @infinite_list
while, according to S03, this is long:
@short_list >>=><< @lo
On 8/24/06, Mark J. Reed <[EMAIL PROTECTED]> wrote:
On 8/24/06, Luke Palmer <[EMAIL PROTECTED]> wrote:
> Well, actually Array would be a subtype of Array::Const, not t'other
> way round.
Why? That makes no sense to me. An Array isn't a variety of
constant Array; a
On 8/25/06, Mark J. Reed <[EMAIL PROTECTED]> wrote:
Why not? Is it any weirder than simply changing that functionality
beyond recognition?
You can always fake removing functionality even if the language
doesn't actually support it.
Yes, yes, of course. That is not the issue. We are trying t
On 8/25/06, Daniel Hulme <[EMAIL PROTECTED]> wrote:
That's because you're used to one way of thinking about class
inheritance: that the subclass can do everything that the superclass can
do, and more. In this scheme, you might have a Square class, with a
field representing its corner and another
On 8/25/06, Michael Snoyman <[EMAIL PROTECTED]> wrote:
I asked this same question on perl6-users, but no one really seemed to have
a definitive answer, so please forgive me for reasking.
I was wondering how named arguments would work when parameters of different
types had the same name, ie sub f
On 8/30/06, chromatic <[EMAIL PROTECTED]> wrote:
On Wednesday 30 August 2006 04:12, Watson Ladd wrote:
> Seriously, what's so bad about adding functionality into
> a language?
I once saw an overfilled waterbed that was almost as tall as I am. I would
have called it PHP, but it didn't explode a
On 8/31/06, Juerd <[EMAIL PROTECTED]> wrote:
Still, though, How would you specify :g? It doesn't make a lot of sense
on rx// -- just like you can't use it with qr// in Perl 5.
It is a good point that it doesn't belong on the regex. Perhaps:
$foo.subst(/bar/, "baz", :g)
That seems to work,
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 introduces two different si
On 9/20/06, Larry Wall <[EMAIL PROTECTED]> wrote:
Conjecture: We need a corresponding sigil to request captureness.
As with @ and %, you can store a capture in a $ to hide it, but we
don't have the ability to have capture variables that know how to
behave like captures without fakey syntactic hel
On 9/25/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Log:
Slaughter of special [,], now is just listop form of [...]
To support |func() syntax, | is the new * (desigilized)
Woohoo! I was about to complain about this whole "capture sigil"
nonsense, but I'm guessing somebody else already di
On 9/27/06, Aaron Sherman <[EMAIL PROTECTED]> wrote:
BTW: for the above, it would be nice to be able to say:
when m:i/^perl$/ {...}
without all the "noise". That is, it would be nice to have something like:
when 'perl':i {...}
Well, there are a few ways to do that:
given
On 10/2/06, Jonathan Lang <[EMAIL PROTECTED]> wrote:
I'm not used to programming styles where a programmer intentionally
and explicitly forbids the use of otherwise perfectly legal code. Is
there really a market for this sort of thing?
This reminds me of the endless student "proofs" that trise
On 12/12/06, TSa <[EMAIL PROTECTED]> wrote:
HaloO,
Jonathan Lang wrote:
> In any case, one should never add
> anything while going from specific to general.
The crux of my example is that one indeed adds methods
in the supertype. The subtype receives a standard
implementation. This pattern is a
On 12/13/06, Luke Palmer <[EMAIL PROTECTED]> wrote:
Things work a little differently for required methods. When a
superrole requires a method be implemented, we (the language
designers) have a choise to make: it is illegal if the superrole
requires a method that the subroles don't i
In spite of Larry's comments, I will continue to entertain this idea
until it is solid to myself that I would be comfortable accepting it.
On 12/13/06, Jonathan Lang <[EMAIL PROTECTED]> wrote:
Agreed. The question is whether you think of a role as a set of
methods ("intension set") or as a set
1 - 100 of 1367 matches
Mail list logo