Mark A. Biggar writes:
Larry Wall wrote:
On Sat, Feb 28, 2004 at 11:59:15AM -0800, Gregor N. Purdy wrote:
: Smylers --
:
: So, what I'm looking for is more explicit phrasing around immediately
: above. In the example, the column range for the overflow field is
: exactly the same as that
John Williams writes:
I want to get from here
method bar_attr(?$val) is accessor {
$.bar_attr = $val if exists $val;
return $.bar_attr;
}
to here
method bar_attr() is rw {
return my $x is Proxy (
for = $.bar_attr,
FETCH = {
Austin Hastings writes:
Suppose I want to say:
sub sublist(@a, $start, $cnt) {
return @a[$start] +next --$cnt;
}
where +next is a binary macro that takes as its lhs an array element
access, and its rhs a number, and returns a list of the array element
followed by the next RHS
Smylers writes:
Luke Palmer writes:
Uri Guttman writes:
DC == Damian Conway [EMAIL PROTECTED] writes:
DC @sorted = sort {-M}={$^b cmp $^a} @unsorted;
but there is no comma before @unsorted. is that correct?
Yes. Commas may be ommitted on either side of a block
Smylers writes:
Joe Gottman writes:
sort {$_.key} (1= 'a', 10 = 'b', 2 ='c');
There is nothing in the signature of the key-extractor to suggest that
all the keys are numbers, but as it turns out they all are.
Are they? I'd been presuming that pair keys would always be strings
Smylers writes:
Luke Palmer writes:
After this statement:
$x = '345';
C$x is a number.
Oh. I'd been assuming that quote marks indicated strings, and that,
while a string containing only digits could obviously be treated as a
number (as in Perl 5), it wouldn't be one
Dave Whipp writes:
Damian Conway [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
type KeyExtractor ::= Code(Any) returns Any;
# Modtimewise numerically ascending...
@sorted = sort {-M} @unsorted;
One thing I've been trying to figure out reading this: what is
Uri Guttman writes:
DC == Damian Conway [EMAIL PROTECTED] writes:
DC # Modtimewise numerically ascending...
DC @sorted = sort {-M $^a = -M $^b} @unsorted;
DC # Fuzz-ifically...
DC sub fuzzy_cmp($x, $y) returns Int;
DC @sorted = sort fuzzy_cmp, @unsorted;
Luke Palmer writes:
Yes. Commas may be ommitted on either side of a block when used as an
argument. I would argue that they only be omitted on the right side, so
that this is unambiguous:
if some_function { ... }
{ ... }
Which might be parsed as either
Damian Conway writes:
type KeyExtractor ::= Code(Any) returns Any;
type Comparator ::= Code(Any, Any) returns Int;
type Criterion::= KeyExtractor
| Comparator Pair(KeyExtractor, Comparator)
;
type Criteria ::=
Uri Guttman writes:
LP == Luke Palmer [EMAIL PROTECTED] writes:
LP Uri Guttman writes:
because that would be the default comparison and the extracted key value
would be stringified unless some other marker is used. most sorts are on
strings so this would be a useful huffman
Uri Guttman writes:
because that would be the default comparison and the extracted key value
would be stringified unless some other marker is used. most sorts are on
strings so this would be a useful huffman and removal of a redundancy.
While I like where most of this is going, I beg to differ
Aaron Crane writes:
Luke Palmer wrote:
Any other ideas?
How about something like this, modulo any errors in my Perl 6 syntax?
sub sort(?cmp = infix:cmp, +$key, +$desc, [EMAIL PROTECTED]) { ... }
I think that allows all of these:
# P5: @sorted = sort @unsorted;
@sorted = sort
Aaron Crane writes:
I have one other idea, but I can't decide if I like it:
@unsorted == sort rinfix:cmp == @sorted;
That is, rinfix: (or some other name) is like infix:, but gives you a
function that reverses its arguments before actually running the operator.
Perhaps it could even be
Jonathan Lang writes:
How about including something similar to ==, but which binds the elements
of the list to the various positional parameters? For instance:
@sorted = sort {infix:= args map {$_.foo('bar').compute}, $^a, $^b }
@unsorted;
Where
@x = $a, $b, $c;
Jonathan Lang writes:
We already have that. It's spelled:
routine [EMAIL PROTECTED];
Or
routine * == @x;
Then you've got your solution:
@sorted = sort {infix:= * map {$_.foo('bar').compute}, $^a, $^b }
@unsorted;
or
@sorted = sort {($^a, $^b)
I've been thinking about this problem which comes up in my code a lot:
@sorted = sort { $^a.foo('bar').compute = $^b.foo('bar').compute }
@unsorted;
Often the expressions on each side are even longer than that. But one
thing remains: both sides are exactly the same,
Uri Guttman writes:
GNP == Gregor N Purdy [EMAIL PROTECTED] writes:
GNP (But, the GRT doesn't apply to sorting general objects, and the
GNP example has @unsorted containing objects on which we run
GNP .foo('bar').compute.)
there are no restrictions on what the GRT (or ST) can sort.
Larry Wall writes:
On Mon, Feb 02, 2004 at 02:09:33AM -0700, Luke Palmer wrote:
: method if_statement::code($rc) { # $rc is the regcounter
: self.item[0].code($rc.next('condition'))
: ~ unless $rc{condition}, $rc{Lfalse}\n
: ~ self.item[1].code($rc.next
I've been writing a lot of compiler recently, and figuring as how Perl
6 is aiming to replace yacc, I think I'll share some of my positive and
negative experiences. Perhaps Perl 6 can adjust itself to help me out
a bit. :-)
=over
=item * RegCounter
I have a class called RegCounter which is
Alex Burr writes:
--- Andy Wardley [EMAIL PROTECTED] wrote:
Adding unicode operators to Perl will just reinforce
its reputation as
a line noise language.
Perl6, the language with *real* runes.
Come to think of it, some of the ogham runes would
look more incharacter as a
Austin Hastings writes:
-Original Message-
From: Gordon Henriksen [mailto:[EMAIL PROTECTED]
Austin Hastings wrote:
OTOH, Robin's concern for how to code when you're stuck with 7 bit
ascii on the boot console of a Sun box remains valid, and *I* sure
would rather have a
I wrote:
But I think that literal and are quite nice alternatives for and
[1], and if the only think that's holding us back is the bitshift
operators, we should kill them -- turn them into functions or something.
Cshl and Cshr aren't so bad, are they?
Or named operators. As in:
Ph. Marek writes:
Hello everybody,
first of all please forgive me if I'm using the wrong words - I'm not up to
date about the (current) meanings of methods, functions, etc.
I read the article
http://www.cuj.com/documents/s=8042/cuj0002meyers/
There is stated (short version -
Scott Walters writes:
On 0, Rod Adams [EMAIL PROTECTED] wrote:
Also, isn't it a pain to type all these characters when they are not on
your keyboard? As a predominately Win2k/XP user in the US, I see all
these glyphs just fine,but having to remember Alt+0171 for a is going
to get
Luke Palmer writes:
Scott Walters writes:
This would lend itself a P5 backport that did overload on its argument, too. If
it found that the thing on the right hand side was also overloaded into the
same class, it is could use a single iterator on both sides, otherwise it would
treat
Austin Hastings writes:
Hmm. The text and examples so far have been about methods and this
seems to be about multi-methods. Correct me if I'm wrong ...
You're wrong. Consider my example, where via single inheritance we reach a
layered list of methods, each of which replaces the previous
Jonathan Lang writes:
Luke Palmer wrote:
Scott Walters writes:
Would it be possible to subclass things on the fly, returning a
specialized object representing the argument that knew how to
vectorize when asked to add? Aren't add, subtract, multiply, and so
on, implemented
Dmitry Dorofeev writes:
Hi all.
Sorry if this idea|question has been discussed or has name which i don't
know about.
I am not very good at OO but I tried at least 2 times to develop with
it though :-) Last time it was Java. The problem is that when i going
to use some 'standard' class or
Larry Wall writes:
On Thu, Jan 22, 2004 at 07:03:26PM -0700, Luke Palmer wrote:
: Larry Wall writes:
: On the other hand, we've renamed all the
: other bitwise operators, so maybe we should rename these too:
:
: +bitwise left shift
: +bitwise right
Austin Hastings writes:
How do you handle operator precedence/associativity?
That is,
$a + $b + $c
If you're going to vectorize, and combine, then you'll want to group. I
think making the vectorizer a grouper as well kills two birds with one
stone.
$a + $b + $c
vs.
$a +
Austin Hastings writes:
Sortof. I think Larry was implying that rand returned an infinite list
of random numbers in list context. If not, then what he said was wrong,
because it would be sick to say that:
(1,2,3,4,5) + foo()
Calls foo() 5 times.
Why would it be sick, and
Luke Palmer writes:
(1,2,3,4,5) + foo() # Maybe the same as above? What does
infix:+(@list,$scalar) do?
Well, what does a list return in scalar context? In the presence of the
C comma, it returns 5 for the last thing evaluated. In its absence, it
returns 5 for the length
Larry Wall writes:
On Thu, Jan 22, 2004 at 08:08:13PM -0500, Joe Gottman wrote:
:I just realized a potential flaw here. Consider the code
: $a = 1;
:
:Will this right-shift the value of $a one bit and assign the result to $a
: (the current meaning)? Or will it assign the
Warning: spacey, tangential semi-argument ahead.
Larry Wall writes:
On Tue, Jan 20, 2004 at 01:54:33AM -0700, Luke Palmer wrote:
: A thought occurred to me. What should this return:
:
: [1,2,3] + [4,5,6]
:
: At first glance, one might say [5,7,9]. But is that really the best
: way
Jonathan Scott Duff writes:
On Tue, Jan 13, 2004 at 10:16:48PM -0700, Luke Palmer wrote:
So, let's say you have something like:
$x = 100_000;
my $seen;
while $x -- 0 {
Don't do that! I had to look at this twice before I decided that
perl6 didn't get a new operator
David Storrs writes:
On Wed, Jan 14, 2004 at 11:57:05AM +, Richard Nuttall wrote:
How about
$test = sub
{
if ( some_expensive_lookup_function() = $MAX_RECORDS )
mark_that_we_have_reached_max_records();
$test = sub{};
};
Then call $test()
David Storrs writes:
Given this code:
if ( some_expensive_lookup_function() = $MAX_RECORDS ) {
mark_that_we_have_reached_max_records();
return;
}
After I enter that block once, I never want to evaluate the condition
again--I want the code to completely
michael.firestone writes:
Is there somewhere I can get the entire perl6-language archive in a
tarball?
I personally don't know, but there could be somewhere.
I am trying to work on turning the Apocalypses into story cards at
http://p6stories.kwiki.org. It would be helpful to me if I
Joe Gottman writes:
- Original Message -
From: Luke Palmer [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 06, 2004 4:51 AM
Subject: [perl] Re: Roles and Mix-ins?
David Storrs writes:
On Sat, Dec 13, 2003 at 11:12:31AM -0800, Larry Wall wrote:
On Sat
Jonathan Lang writes:
I've just been rereading the recent discussions, and I noticed something
that I missed the first time:
Larry Wall wrote:
Traits are not definitional but rather operationally defined in the
worst way. That's why traits are renegade roles. They don't play by
the
Abhijit A. Mahabal writes:
On Fri, 19 Dec 2003, Larry Wall wrote:
On Fri, Dec 19, 2003 at 10:23:45AM -0800, Austin Hastings wrote:
: Of course, when I do:
:
: my $x = 0 but (true|false);
:
: then what happens?
That's the problem with making them methods. Any such operational
Larry Wall writes:
But if you say something like:
class DangerousPet does Pet does Predator {
multi method feed ($x) {...}
}
then DangerousPet::feed is called only when multimethod dispatch
would have thrown an exception. Alternately, multi's will probably have
some way
Piers Cawley writes:
The Perl 6 Summarizer [EMAIL PROTECTED] writes:
Vocabulary
If you're even vaguely interested in the workings of Perl 6's object
system, you need to read the referenced post.
Luke Palmer, worrying about people using Object related vocabulary
Jonathan Lang writes:
Larry Wall wrote:
Well, nothing much really supercedes the class. Even traits have
to be requested by the class, and if you have an entirely different
metaclass, it's probably declared with a different keyword than
Cclass. (But sure, multiple traits will have to
Michael Lazzaro writes:
On Sunday, December 14, 2003, at 06:14 PM, Larry Wall wrote:
But the agreement could be implied by silence. If, by the time the
entire program is parsed, nobody has said they want to extend an
interface, then the interface can be considered closed. In other
words,
Chip Salzenberg writes:
According to Jonathan Scott Duff:
Those classes that are closed can be opened at run-time and the
user pays the penalty then when they try to modify the class [...]
The optimization that can be reversed is not the true optimization.
While poetic and concise, I
Michael Lazzaro writes:
I agree, it is frequently the case that the question of speed is made
critical by people who most assuredly do not need it. But they still
decide that way, and I have found that asserting to them that speed is
not important has been... well, less than effective. I
Chris Shawmail (E-mail) writes:
I'm still digesting the vocabulary thread, but while I do, let me ask a
question that's probably crystal clear to everyone else.
Do roles act as a form of mix-in, as Ruby modules may, and Objective-C
protocols do?
Would the following two snippets be at all
So I'm seeing a lot of inconsistent OO-vocabulary around here, and it
makes things pretty hard to understand.
So here's how Perl 6 is using said inconsistent terms, AFAIK:
- attribute
A concrete data member of a class. Used with Chas.
- property
An out-of-band sticky note
Larry Wall writes:
Anyway, this all implies that use of a role as a method name defaults to
returning whether the type in question matches the subtype. That is,
when you say
$foo.true
it's asking whether the Boolean property fulfills the true constraint.
When you say
$bar.red
Jonathan Scott Duff writes:
On Thu, Dec 04, 2003 at 05:57:52PM -0700, Luke Palmer wrote:
Hodges, Paul writes:
I'd *like* to be able to predeclare a trait or property to be distributed
across any values placed in this array, but only this array. For example, it
would be nice if I could
Hodges, Paul writes:
How about
use Baz; # assume object type
my property foo;
my @bar of Baz is false but foo; # maybe not what you meant?
Definitely not what you meant. Fortunately, the compiler will teach you
a thing or two about it: Cfalse is not a trait.
But indeed foo would
Paul Hodges writes:
Luke Palmer:
Something likely more like:
my role property_wrap[Property [EMAIL PROTECTED] {
method STORE($newval) { SUPER::STORE($newval but [EMAIL PROTECTED]) }
}
@bar but= property_wrap[false, foo];
...square brackets?
...roles can have
Michael Lazzaro writes:
On Monday, December 1, 2003, at 01:05 PM, Hodges, Paul wrote:
Didn't know is would do that. Good to know!
And in my meager defense, I did reference MikeL's operator synopsis as
of
3/25/03, which said ^[op] might be a synonym for or (Sorry,
no
fancy chars here.
Luke Palmer writes:
And as far as I know, and are exactly equivalent to and in all
cases.
By which I mean and , of course. :-/
(mutt is kind of a pain in this area)
Luke
Hodges, Paul writes:
I assume you're setting the the value, so I think I understand it, but
how about
sub setvals ($o, [EMAIL PROTECTED]) {
$o but= $_;
$o.$_ = true;
}
Though I'm still iffy about that $o.$_ business. I think
$_(true) is better.
Paul Hodges writes:
Larry Wall writes:
Perl 5 didn't allow exportation of lexicals because typeglobs only
dealt with package variables, not lexical variables. In Perl 6
we'll be able to alias both lexicals and package variables. That
implies that a lexically scoped name can be exported,
Here's a series of questions/confirmation requests about how properties
work (but specifically run-time properties, not traits):
Use Cbut to assign a property to a Ivalue:
$a = $b but foo; # $a has property foo, $b does not
Properties are just out-of-band methods:
if $x.foo {
Piers Cawley writes:
Simon Cozens [EMAIL PROTECTED] writes:
But it isn't, and I don't know why it isn't, and so we end up
spending loads of time discussing things that can be punted out to
modules. Designing Perl 6 is hard enough; let's not try to fill
CP6AN at the same time.
But the
Austin Hastings writes:
-Original Message-
From: Adam Turoff [mailto:[EMAIL PROTECTED]
On Tue, Nov 25, 2003 at 01:03:19PM +1100, Damian Conway wrote:
Schwern observed:
Perhaps this is yet another argument for insisting on:
while do {$n++; $foo $bar}
Damian Conway writes:
Hmm. I think I may have missed Luke's point. Which was (presumably):
what if C$opus.write_to_file($file); validly returns Cundef?
In which case I think we just fall back to:
try{$opus.write_to_file($file); CATCH {die Couldn't write to $file:
$!}}
Jonathan Lang writes:
Larry Wall wrote:
So far we've only allowed is parsed on the macro itself, not on
individual arguments. Still, that's an interesting idea.
Forgive me if this has already been addressed, but this could have some
useful applications:
So far, everything I've read
Smylers writes:
Piers Cawley writes:
Stphane Payrard [EMAIL PROTECTED] writes:
s/// in string context should return the string after substituion.
Surely it should return the string after substitution, but with an
appropriate 'but true' or 'but false' property depending on
Jonathan Scott Duff writes:
On Wed, Nov 19, 2003 at 12:49:21PM -0800, Larry Wall wrote:
Sorry, I wasn't being very clear. It wouldn't be logically attached to
the outside of the for, but to the inside of the confer, or whatever:
@foo = gather {
for @a - $x { pick $x if
Piers Cawley writes:
All of which means you can wrap it up in a macro and prove Simon's
point about what's syntax and what's CP6AN:
macro unless_all( Block test is parsed /perl.expression/,
Block consequence, [EMAIL PROTECTED] )
{ my $guard = Object.new;
Gordon Henriksen writes:
Larry Wall wrote:
On Tue, Nov 18, 2003 at 06:28:59PM -0500, Gordon Henriksen wrote:
my @b = for @a - $_ {
...
}
That will be a syntax error. Generators are too mind-stretching to
inflict on novices [...]
I making the point that
Jonathan Lang writes:
My apologies for the break in the chain of responses; I lost your reply
before I could reply to it, and had to retrieve it from the list archives.
Luke Palmer wrote:
Well, multi is no longer a declarator in its own right, but rather a
modifier. Synopsis Exegesis
I was reading the most recent article on perl.com, and a code segment
reminded me of something I see rather often in code that I don't like.
Here's the code, Perl6ized:
... ;
my $is_ok = 1;
for 0..6 - $t {
if abs(@new[$t] - @new[$t+1]) 3 {
$is_ok = 0;
Simon Cozens writes:
[EMAIL PROTECTED] (Luke Palmer) writes:
I was reading the most recent article on perl.com, and a code segment
reminded me of something I see rather often in code that I don't like.
The code in question got me thinking too; I wanted to find a cleaner
way to write
Austin Hastings writes:
Luke Palmer wrote:
I was reading the most recent article on perl.com, and a code segment
reminded me of something I see rather often in code that I don't like.
Here's the code, Perl6ized:
... ;
my $is_ok = 1;
for 0..6 - $t {
if abs
Austin Hastings writes:
-Original Message-
From: Michael Lazzaro [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 18, 2003 2:06 PM
To: [EMAIL PROTECTED]
Subject: Re: Control flow variables
On Tuesday, November 18, 2003, at 06:38 AM, Simon Cozens wrote:
Given that
Austin Hastings writes:
-Original Message-
From: Michael Lazzaro [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 18, 2003 2:06 PM
To: [EMAIL PROTECTED]
Subject: Re: Control flow variables
On Tuesday, November 18, 2003, at 06:38 AM, Simon Cozens wrote:
Given that
Austin Hastings writes:
From: Luke Palmer [mailto:[EMAIL PROTECTED]
Austin Hastings writes:
From: Michael Lazzaro [mailto:[EMAIL PROTECTED]
Would that then imply that
sub blah {
... # 1
return if $a;# 2
Larry Wall writes:
If you write:
multi method add( $self: Foo $foo, Bar $bar );
then there are multiple add methods in the current class. Note the
invocant is not optional in this case. Also, there's an implied
second colon after $bar, indicating the end of the arguments to be
Jonathan Lang writes:
To make method work as an alternative for multi in every case, the
only changes that you'd need to make would be to allow more than one
invocant to be explicitly specified in the method syntax, and to allow
the positional portion of the parameter list to optionally be
Hi Doug,
Doug McNutt writes:
The first source of discussion was around whether there is any
consistent meaning to array operations. The source of this was that
some felt that other people may want C* to mean something other
than element-wise multiplication by default (e.g. matrix inner
So, we can have :: in names, but that doesn't represent any inherent
relationship between the module before the :: and the one after. I
think this is an important thing to keep.
However, will it be possible to, for example, do:
module Foo;
module Bar { ... }
And refer to the inner
Joe Gottman writes:
I just reread the section of A6 about currying, and I have several
questions about it.
1) Suppose I have a function like the following:
sub foo($param, @param) {...}
where the parameter names differ only by their sigils. Is it legal
for me
David Storrs writes:
On Fri, Oct 24, 2003 at 12:57:18AM -0600, Luke Palmer wrote:
Presuming you can do:
(who = $name, why = $reason) := (why = $because, who = me);
(from A6)
Does that imply that you can do:
sub routine (name = $nombre, date = $fecha
Presuming you can do:
(who = $name, why = $reason) := (why = $because, who = me);
(from A6)
Does that imply that you can do:
sub routine (name = $nombre, date = $fecha) {...}
Anyway, I just realized that this is finally an elegant way to do
multiple, unordered return values:
Joe Gottman writes:
How do you declare a function that doesn't return anything? For instance, a
C++ swap function might be declared
template class X
void swap(X x, X y);
It would be nice to declare the corresponding Perl6 function as
sub swap ($x is rw, $y is rw) returns nothing
Steve Fink writes:
Ok, I'm back to argument passing. I'm starting a new thread because
I'm lazy and I have to scroll back too far in my mailer to see the old
arg passing thread. :-) And yes, most of this message should also be
on -languages.
Which it now is. Although, there are some
Austin Hastings writes:
-Original Message-
From: Luke Palmer [mailto:[EMAIL PROTECTED]
But this is already supported, in its most powerful form:
wrap block: { call; other_stuff() }
Hmm, no.
That does a call, which presumes a return, which burns up
who-knows-how-many
Simon Cozens writes:
[EMAIL PROTECTED] (Austin Hastings) writes:
Frankly, I think I'd rather see:
Some nits:
macro atexit($code) is parsed(/{ Perl6.line* }/) {
Probably just
macro atexit($code) is parsed(/Perl6.block/) {
$block .= $code;
$block _= $code;
So, I must ask, what does this do:
sub foo() {
return my $self = {
print Block;
return $self;
}
}
my $block = foo;
print Main;
$block();
print End;
That is, the block returns from a function that's not currently
executing.
Stefan Lidman writes:
So, I must ask, what does this do:
sub foo() {
return my $self = {
print Block;
return $self;
}
}
my $block = foo;
# = sub {print Block; return $self;}
A6:
One obvious difference is that the
Jeff Clites writes:
Speaking to the practical side, I have written code that has to
disentangle
itself from the failure of a complex startup sequence. I'd love to be
able
to build a dynamic exit sequence. (In fact, being able to do Cblock
.=
{ more_stuff(); };/C is way up on my list...)
Simon Cozens writes:
[EMAIL PROTECTED] (Luke Palmer) writes:
[$lhs, $rhs]\220\215.\235\237compile;
What's that in old money?
Eep. I thought I had mutt's utf-8 working, but apparently not.
Does anyone who knows about these things want to mail me instructions,
or something? That'd be nice
Cool stuff. In my usual pedantic sort of way, I'll go through the
message and fix everything you said. For educational purposes only, of
course :-)
Eirik Berg Hanssen writes:
Luke Palmer [EMAIL PROTECTED] writes:
Hmm, since we're requiring no whitespace between a variable and it's
Austin Hastings writes:
How can I conveniently pass an extra parameter to a historically binary
operator?
I see a few possibilities. The first, call it like a function:
if infix:eqn(Dough, Douglas, n = 4) {...}
Or, you could use the adverbial modifier Cwhere (well, not officially
yet,
Piers Cawley writes:
Luke Palmer [EMAIL PROTECTED] writes:
Also, the standard library, however large or small that will be, will
definitely be mutable at runtime. There'll be none of that Java you
can't subclass String, because we think you shouldn't crap.
Great. But will it also
Nicholas Clark writes:
On Mon, Sep 15, 2003 at 11:19:22AM -0400, Dan Sugalski wrote:
Changing a function from pure to impure, adding an overloaded operator, or
changing the core structure of a class can all result in code that needs
regeneration. That's no big deal for code you haven't
I was reading through E6 again, and noticed something a little
troubling:
sub part ([EMAIL PROTECTED] is rw) {...}
Well, Iof course @_ Cis rw! Otherwise we wouldn't be able to
Cshift things off of it. What was actually meant, I presume, is:
sub part ([EMAIL PROTECTED] of (Object is
Jonadab the Unsightly One writes:
Dan Sugalski [EMAIL PROTECTED] writes:
Next Apocalypse is objects, and that'll take time.
Objects are *worth* more time than a lot of the other topics.
Arguably, they're just as important as subroutines, in a modern
language.
Speaking of objects...
Alex Burr writes:
In theory you could write one as a perl6 macro, although it would be
more convenient if there was someway of obtaining the syntax tree of a
previously defined function other than quoting it (unless I've missed
that?).
There is a large class of cool optimizations possible
Piers Cawley writes:
So, I was wondering about how to do multidispatch based on the
context in which something is called, which leads me to wonder if
there's going to be a way of reifying calling context so I could
write:
method whatever($arg1, $arg2)
{ my multi whatever ($self,
Wow, what an old thread...
Jonadab the Unsightly One writes:
"Abhijit A. Mahabal" [EMAIL PROTECTED] writes:
On the other hand, if you wanted to say "true for all except exactly
one value, I can't think of a way.
Easy. The following two statements are
Gordon Henriksen writes:
Taking a thread from Perl 6 Internals. Will Perl 6 support this behavior?
$ perl 'EOT'
my @ary;
my $ref = \$ary[0];
$$ref = value;
print '$ary[0] : ', $ary[0], \n;
EOT
$ary[0] : value
Jonadab The Unsightly One wrote:
John Siracusa [EMAIL PROTECTED] writes:
Did this ever get resolved to anyone's satisfaction? While reading
EX6, I found myself wonder exactly what for() would look like in
Perl 6 code...
A for loop[1] is basically syntax sugar for a while
601 - 700 of 974 matches
Mail list logo