On Wed, Aug 16, 2000 at 04:49:15PM -0500, David L. Nicol wrote:
or AUTOLOAD can be defined in terms of Ccatch
and overloaded that way, rather than being its own
kind of magic.
catch "AUTOLOAD-$classname-$polymorphicsignature" {...
But why should I have to know that a sub I want
Graham Barr wrote:
On Wed, Aug 16, 2000 at 04:49:15PM -0500, David L. Nicol wrote:
or AUTOLOAD can be defined in terms of Ccatch
and overloaded that way, rather than being its own
kind of magic.
catch "AUTOLOAD-$classname-$polymorphicsignature" {...
But why should I have
"David L. Nicol" wrote:
What I was suggesting was, if you want to overload the autoloading
of something, it could be done with "catch" instead of rewriting
the ::OVERLOAD procedure, for that module.
"method not loaded" becomes an exception which is thrown, rather
than "AUTOLOADING" being
I had been thinking of some special goto labels, things like
BEGINNING and END which would signify the beginning and end of the
block enclosing the throw; perhaps every SCOPE object could have
these labels refered to in terms of them. inside a Ccatch we
need to have access to a lot of internal
At 09:12 PM 8/16/00 -0600, Tony Olekshy wrote:
Executive summary: I no longer want catch blocks to "daisy chain"
after a exception is thrown in a catch block. Thanks to everyone
who has helped me see the light on this.
I'm not sure what you mean by "daisy chain". I have been taking it to mean
Peter Scott wrote:
Tony Olekshy wrote:
trap { $@-{message} =~ /divide by 0/ } catch { ... }
I don't think you need another keyword here. Just support an
expression argument to catch and you can do
catch $@-{message} =~ /divide by 0/ { ... }
If it needs to be more
I don't see why this should be an implicit counter. This (might)
cause extra work for every foreach loop in every program (depending on
how foreach is implemented).
Why not use an explicit counter instead? Something like
foreach $item $index (@array) {
print $item, " is at index ",
Perl6 RFC Librarian writes:
The chief instance where Perl5 requires dynamic variables is in the
case of package globals.
I think this is a bad idea (so I'm glad you made it optional).
Thanks for the feedback, Nat.
I figured the idea would meet with resistance. Really, since the
whole
[EMAIL PROTECTED] (Nathan Wiger) wrote on 14.08.00 in
[EMAIL PROTECTED]:
Well, lexical variables don't belong to any package in Perl. They're not
in the symbol table, hence why others can't mess with them. That's why a
"my $var" is different from a "$pkg::var". The latter gets in the
I was just sitting here thinking over all these issues and making
various responses (as well as adjustments to my mental model for RFC
106 v2).
With the radical proposal of eliminating dynamic variables that RFC
106 includes (as an option! Don't get excited; read the RFC first!),
I've
This message is intended to remind us all that the deadline for this
working group is _tomorrow_.
Not so fast!
This is not true anymore. I sent an email to K. requesting all the
current sublists be made permanent. She agreed. Here's the list of
*permanent* sublists:
-io = ALL I/O
On Aug 16, 8:21pm, Perl6 RFC Librarian wrote:
# this is perl6
sub foo :lvalue ($new) {
$variable = $new;
}
A nice idea, but one of the reasons for the original proposal was
to make
$foo-bar = $x;
behave the same as:
$foo-bar($x);
Your proposal provides a neat solution for
At 07:04 PM 8/17/00 +0200, Johan Vromans wrote:
Nathan Wiger [EMAIL PROTECTED] writes:
Most of the places I've seen them used really well is if
they walk and talk like other forms:
$cgi-param($var, @val); # traditional
$cgi-param($var) = @val; # lvalue, but same thing
I
At 05:49 AM 8/18/00 +1000, Damian Conway wrote:
And I keep pointing out that this is only one aspect of lvalue subroutines.
The point of an lvalue subroutine is not to make assignment to the return
value
work, it is to make the return value an *lvalue*. That's a much more general
thing, because
This and other RFCs are available on the web at
http://dev.perl.org/rfc/
=head1 TITLE
Subroutines: Extend subroutine contexts to include name parameters and lazy arguments
=head1 VERSION
Maintainer: Damian Conway [EMAIL PROTECTED]
Date: 17 August 2000
Version: 1
Mailing List: [EMAIL
On Wed, Aug 16, 2000 at 10:35:09AM -0700, Nathan Wiger wrote:
I agree. I think the trend should be to establish some permanent
sublists, which we're informally leaning towards already. Something
like:
-io = ALL I/O issues, like open/socket/filehandles
-subs = ALL sub/method/func
At 04:12 PM 8/17/00 +1000, [EMAIL PROTECTED] wrote:
On Wed, Aug 16, 2000 at 10:35:09AM -0700, Nathan Wiger wrote:
I agree. I think the trend should be to establish some permanent
sublists, which we're informally leaning towards already. Something
like:
-io = ALL I/O issues, like
On Wed, Aug 16, 2000 at 11:15:40PM -0700, Peter Scott wrote:
Sorry I didn't chime in earlier, but I would like to say that I prefer
published deadlines. Reason: people will talk for as long as you give
'em. However long a meeting is scheduled for, that's how long it will
take. We're
On Wed, 16 Aug 2000, Peter Scott wrote:
[...]
Ask, can you change the deadlines on these lists to be "as long as it
takes" or similar?
Sorry I didn't chime in earlier, but I would like to say that I prefer
published deadlines. Reason: people will talk for as long as you give
'em.
Steve Simmons wrote:
On Wed, Aug 16, 2000 at 08:03:31PM -, Perl6 RFC Librarian wrote:
Perl should provide a mechanism to have common code autoloaded from a
file. . . .
A C/etc/perlrc file could be used to set system-wide defaults that
the system administrator would like to
=head1 DESCRIPTION
Many other programs have so called "resource configuration" files (at
least that's what I call them) that are loaded and interpretted upon
program startup. Some example programs that have this ability include
bash, mutt, and python. Perl should do the same.
A
John Porter [EMAIL PROTECTED] writes:
Bryan C. Warnock wrote:
Composer::Post.assumes(Iterator.each(Iterator.all(List)=="Programmers")
-programs=(Language::Programming.uses("Perl")==true
Methodology.implemented(Style.OO==true,Time.all==true)))==true;
Not at all. But in
hi jeremy, all,
here is one simple example , let say we have this XML file:
root
unit
q/q
answertag/tag/answer
/unit
unit
q/q
answer
desc
code/code
/desc
/answer
/unit
unit
q/q
answer
code/code
/answer
/unit
/root
how we can implement the following
hi,
So how is that different from:
do BLOCK1 until do BLOCK2
It's the same.
But the real fun starts when blocks and functions can suspend and
resume.
{ ...
# Return value and suspend.
suspend $i;
# Next iteration will resume here
...
} andthen { ... };
Nathan Torkington [EMAIL PROTECTED] writes:
Piers Cawley writes:
The $a and $b of the sort comparator were A Bad Idea to begin with.
Ditto. Can we ditch these in Perl 6? Don't see why $_[0] and $_[1] can't
be used, or even a more standard $1 and $2. Either one makes it more
=head1 REFERENCE
Icon language brief intro :
http://www.cs.arizona.edu/icon/intro.htm
RFC 25 (v1): Multiway comparisons
and now snip from the Icon language :
http://www.cs.arizona.edu/icon/docs/ipd266.htm
snip
2.1 Conditional Expressions
In Icon there are conditional expressions that may succeed and produce a
result, or may fail and not produce any result. An example is the
On 16 Aug 2000, Chaim Frenkel wrote:
"BB" == Buddha Buck [EMAIL PROTECTED] writes:
BB I am assuming that the system clocks are set accurately to UTC (or some
BB derivative, like (US) Eastern Standard Time). UTC is what time-servers
BB report. UTC has leap seconds, which are inserted
Lightning flashed, thunder crashed and "Jeremy Howard" [EMAIL PROTECTED] whispered:
| No. They are lazily evaluated and require special optimisations to allow
I don't completely understand this whole lazy evaluation, so I'm confused
how these functions would work on them. Explain to me how you
Ariel Scolnicov wrote:
John Porter [EMAIL PROTECTED] writes:
foo = bar;
foo could be just about anything: a string, a hashref, some other
blessed ref (with op"=" possibly overloaded!), or even an lvalue sub.
Do you know? Should you care?
I don't know, but I think I should
Mike Pastore wrote:
On Wed, 16 Aug 2000, John Porter wrote:
grep() always treats its "second" arg as a list, even if it's a scalar,
or some other list-of-one (or none); and grep() always returns a list,
even if it's a list of one (or none).
True on the first part, false on the second.
Jon Ericson wrote:
John Porter wrote:
...all variable types (scalar, array, hash) are simply objects.
Not in Perl.
Yes, in perl.
$dog and $cat are objects. $dog can bark and $cat can scratch. The
author of the module (Zoo::Animal?) should have documented these
methods.
And
John Porter [EMAIL PROTECTED] writes:
Ariel Scolnicov wrote:
John Porter [EMAIL PROTECTED] writes:
foo = bar;
foo could be just about anything: a string, a hashref, some other
blessed ref (with op"=" possibly overloaded!), or even an lvalue sub.
Do you know? Should you
To go through a few points that has arisen:
o Why do I think "@" is useless?
OK clearly @x is a list. Good old perl4.
But what is $x[3] ?
It could be a scalar.
BUT it could be a reference to a list.
It could be a reference to a 2D PDL image.
etc.
so clearly we have no real
Chaim Frenkel writes:
The other magic variables would simply end up as some funny 8-bit
characters floating around. With one's handy (several thousand page)
translation table one can then interpret the meaning.
That's insane. We're trying to get rid of special variables named
after obscure
On Wed, 16 Aug 2000, Nathan Wiger wrote:
"Bryan C. Warnock" wrote:
... is the cause for this. All the discussion is taking place in the
master list before the sublists are spawned. You can only express the
opinion that foo is not bar and never should be so many times.
I agree. I
Data::Dumper has been a very useful list debugging tool, for a very unneccessary
problem.
What are these?
$x[$a][$b]
$x-[$a]-[$b]
${$x[$a]}-[$b]
We wish to believe that there are no pointers in Perl, just references. We are
lying to ourselves.
The desire to have $x-[$a] rather than just
Do we want to come up with any modifications to the scope of $! (I'm not
talking about the dual string-number nature)? I've occasionally been
flummoxed by looking at it when there hadn't really been an error (but it's
set anyway, randomly it seems); or calling some module method that failed
On Wed, 16 Aug 2000, David L. Nicol wrote:
Anyone for generalizing "select" to a more general "with" keyword
which would operate on a limited hash and be syntactic sugar for
replacing all appearances of unqualified variables that match
the hash's keys with references into it?
D'oh. s{2) .+^}{}
Mismatch between brain and fingers there somewhere, thanks for
pointing it out.
Dave
On 17 Aug 2000, Johan Vromans wrote:
Dave Storrs [EMAIL PROTECTED] writes:
2) "express" should guarantee that, before it creates a
This seems good...the HOF stuff seems to have pretty well accepted, and
the thumbtack notation with it.
Dave
On Thu, 17 Aug 2000, Clayton Scott wrote:
On Wed, 16 Aug 2000, David L. Nicol wrote:
%record = loadrecord($studentID);
with %record {
On Thu, Aug 17, 2000 at 01:07:30PM -0400, Stephen P. Potter wrote:
* Replace Cm//, Ctr///, and Cs/// with equivalent regularized
functions that take mulitple arguments instead of using specialized
syntax. It would be best if the names could be more "complete", like
match(),
Dave Storrs wrote:
On 17 Aug 2000, Johan Vromans wrote:
Dave Storrs [EMAIL PROTECTED] writes:
2) "express" should guarantee that, before it creates a variable
names $FOO, it first calls "local" on any existing $FOO
Why, if the variable is lexical (see 3)?
D'oh. s{2) .+^}{}
Karl Glazebrook wrote:
But what is $x[3] ?
It could be a scalar.
BUT it could be a reference to a list.
It could be a reference to a 2D PDL image.
... but references are scalar. So, $x[3] *is* a scalar.
That scalar could be a reference to a list. It could be a reference to a 2D
PDL
"Myers, Dirk" wrote:
Karl Glazebrook wrote:
But what is $x[3] ?
It could be a scalar.
BUT it could be a reference to a list.
It could be a reference to a 2D PDL image.
... but references are scalar. So, $x[3] *is* a scalar.
That scalar could be a reference to a list.
Ted Ashton wrote:
Thus it was written in the epistle of Russ Allbery,
This falls firmly in the category of things that are powerful for
experienced users of the language but may be somewhat difficult to learn.
I don't think Perl has being easy to learn as it's primary goal, nor
Karl Glazebrook [EMAIL PROTECTED] writes:
o Why do I think perl has too much line noise? Because of code like this:
@{$x-{$$fred{Blah}}}[1..3]
You're taking the value of the key "Blah" in the hash referred to by $fred
and using it as the key into the hash referred to by $x, treating the
On Thu, Aug 17, 2000 at 01:19:22PM -0500, Jarkko Hietaniemi wrote:
I recently suggested in p5p that for many system calls it could be
checked in *consta...darn, *compile* time whether they are used in
void contect, and _abort_. "No, I'm not going to let you get away
with doing a chdir() and
On Thu, Aug 17, 2000 at 01:07:30PM -0400, Stephen P. Potter wrote:
* Replace Cm//, Ctr///, and Cs/// with equivalent regularized
functions that take mulitple arguments instead of using specialized
syntax. It would be best if the names could be more "complete", like
match(),
This is one of the nice things about Python, in my opinion. Every
error is an exception, so you can feel free to completely ignore
Like end of file? :-)
Hmm. It just occurred to me that you could combine your idea with
exceptions quite nicely: All core functions throw exceptions on
This seems less of a leap of logic/faith:
%record = loadrecord($studentID);
with %record {
print SPAM;
Dear ^name:
Your tuition is now due. Please send in a payment of at least
^minumum.
SPAM
};
"I do not thin' that
Ariel Scolnicov wrote:
Karl Glazebrook [EMAIL PROTECTED] writes:
[...]
o Why do I think perl has too much line noise? Because of code like this:
@{$x-{$$fred{Blah}}}[1..3]
This is indeed horrible. However, I fail to see how cutting out the
"line noise" would make it easier to
Damian Conway wrote:
So Cwith is going to have to do some pretty freaky magic to work out
it should call that sub as part of the Cprint. And call it with a
specifically ordered argument list.
Yes, I never said it would work, just that it looked nicer :)
However, your suggestion
"Stephen P. Potter" [EMAIL PROTECTED] writes:
* Socket functions (such as Caccept, Cbind, etc) should be moved from
the core to modules/libraries.
* Math functions (such as Cabs, Catan2, Ccos, etc) should be moved
from the core to modules/libraries.
* IPC functions (such as Cmsgctl,
David Corbin wrote:
Ariel Scolnicov wrote:
So how do I make Cfoo into an array in the first place? Well, I say
something like Cfoo = (1,2,3). But wait -- that's ambiguous! Is
Cfoo now a copy of the list (1,2,3) (in which case it's an array),
or is it a reference to (1,2,3) (in
I certainly don't want m, tr, or s to go away
(or /regex/ either.) But the =~ bothers me.
I don't think we should change everything. There's a big risk that we
get "fix-happy" and change stuff that doesn't really make an
improvement. Personally, I like =~ because it has a nice analogy to the
Ted Ashton wrote:
But the most direct way to measure how well the
language slides into people's heads is by seeing how hard it is for them
to get the hang of it.
Nope. I've yet to be convinced that "fits in your head" is the same as
"went in easily". Hang it all,
Karl Glazebrook wrote:
Ariel Scolnicov wrote:
Karl Glazebrook [EMAIL PROTECTED] writes:
[...]
o Why do I think perl has too much line noise? Because of code like this:
@{$x-{$$fred{Blah}}}[1..3]
This is indeed horrible. However, I fail to see how cutting out the
In message [EMAIL PROTECTED]
Perl6 RFC Librarian [EMAIL PROTECTED] wrote:
A "sort function" will need to be added into the list of magics
maintained for every associative array.
A set of macros in terms of sort will need to be defined which
replace keys, values, and each functions
In message [EMAIL PROTECTED]
Perl6 RFC Librarian [EMAIL PROTECTED] wrote:
Rather than indicating that lazy evaluation is required by the
addition of incomprehensible syntactic hints, a "lazy array context"
is indicated by the presence of the new keyword Clazy.
I think I've actually
"RA" == Russ Allbery [EMAIL PROTECTED] writes:
RA Damien Neil [EMAIL PROTECTED] writes:
Arrays are ordered. Hashes are not. Sure, you can iterate over a hash,
but add an element to one and you can change the order of everything in
it.
RA Formally, I believe it's permissable for
Nathan Wiger wrote:
We're getting deluged with RFC's and emails. We should start thinking
"will this RFC or idea *add value* to Perl 6?". If not, and it just
makes something work differently, it _might_ not be worth an RFC.
I disagree completely. For one thing, there's no such thing as
Decklin Foster wrote:
[replying from here since this is the only way I received it]
"Myers, Dirk" wrote:
$line/pattern/ ;
/pattern/ ($line) ;
I don't think these should be changed. Here's how I tend to pronouce
things:
$x = 'foo'; # "x gets foo"
print sub {
return SPAM;
Dear $_[0]
Your tuition is now due. Please send in a payment of at least
$_[1].
SPAM
}
What does the second one mean, then? Doesn't
print sub { ... }
I'd like to say that I whole-heartedly endorse the sentiments expressed in
this RFC (and *not* just because it likes my book! ;-)
It will definitely underpin my thinking when I finally put together my
own OO RFCs.
Well done, John.
Damian
Damian Conway wrote:
%professors{ $a-name cmp $b-name };
%students{ $$students{$b}{GPA} = $$students{$a}{GPA} };
These already mean something. Please don't "special-case" them.
No they don't.
[david@nicol1 perl]$ perl -le '%nums = (1..20); print %nums{1}'
Can't use
%professors{ $a-name cmp $b-name };
%students{ $$students{$b}{GPA} = $$students{$a}{GPA} };
These already mean something. Please don't "special-case" them.
No they don't.
Apologies. You're quite correct.
Isn't this better handled with a
What if its a method of anything in an array? $_ is already
a reference to the object on the array in for loops rather
than a copy of it. What if we make change be not something about
for loops, but about anything in an array?
print "The index, in its array, of $_ is
Yes, absolutely, about the semantics.
About the syntax, how about just in a block behind %HASHNAME?
(as long as it doesn't use $a and $b, of course )
(or if the insta-sort thing needs "sort" written in and this doesn't)
%record{
$something_new = 3; # just set
Jonathan Scott Duff wrote:
On Tue, Aug 15, 2000 at 05:47:53PM -0600, Nathan Torkington wrote:
I want
@result = @a || @b;
to be like:
(@result = @a) or (@result = @b);
That's what all my students keep expecting it to mean.
And that's what I keep wishing it meant too.
David L. Nicol wrote:
Yes, absolutely, about the semantics.
About the syntax, how about just in a block behind %HASHNAME?
(as long as it doesn't use $a and $b, of course )
(or if the insta-sort thing needs "sort" written in and this doesn't)
%record{
$something_new = 3; # just set
Jeremy Howard wrote:
This is one of those
few cases where VB has nicer syntax--within a 'with' block you have to
precede a property name with '.' to get the with block scope:
dim height as double
dim ws as new Excel.worksheet // 'worksheet' has a 'height' property
with ws
Lets use hats again then.
%ws{
print ^$height; #prints $ws{height}
print $height; # perl5 visibility rules
};
AFAIK, the entirety of %name{something here} is unplowed ground, as
far as perl syntax goes.
For good reason, AFAIAC.
On Thu, Aug 17, 2000 at 10:48:25PM -0500, David L. Nicol wrote:
Lets use hats again then.
%ws{
print ^$height; #prints $ws{height}
print $height; # perl5 visibility rules
};
But no $ for the keys of %ws.
%ws {
print ^height;
Jonathan Scott Duff wrote:
But no $ for the keys of %ws.
%ws {
print ^height; # prints $ws{height}
print $height; # prints $height
}
I'm thinking that ^name is short for $^name is short for ${^name}
and the longer version is what you have
On Thu, Aug 17, 2000 at 10:48:25PM -0500, David L. Nicol wrote:
Lets use hats again then.
%ws{
print ^$height; #prints $ws{height}
print $height; # perl5 visibility rules
};
But no $ for the keys of %ws.
%ws {
Mmm... yummy... And placeholder names seem to be getting a real
role in life too! I wonder if hashes used as HOF arguments in
general should use placeholder names to fill in their arguments
from the corresponding hash elements. That would be even yummier!
Personally I think an
This discussion should be on the -datetime sublist. Please do not
discuss this RFC any further on the main language list.
K.
--
Kirrily Robert -- [EMAIL PROTECTED] -- http://netizen.com.au/
Open Source development, consulting and solutions
Level 10, 500 Collins St, Melbourne VIC 3000
Phone:
On Thu, Aug 17, 2000 at 09:19:20AM -0700, Peter Scott wrote:
I realize this is very pedestrian compared to the exception-handling stuff
we've been tossing around, which could largely be said to render the issue
moot; but I thought I'd shake the branches anyway and see what fell out.
I'm
-io = ALL I/O issues, like open/socket/filehandles
-subs = ALL sub/method/func issues, like lvalue subs
-strict = ALL lexical/global variable scoping issues
-objects = ALL OO and module issues
-flow = ALL flow/threading issues
-errors = ALL error
"David L. Nicol" wrote:
What if its a method of anything in an array? $_ is already
a reference to the object on the array in for loops rather
than a copy of it. What if we make change be not something about
for loops, but about anything in an array?
print "The index, in its
Glenn Linderman wrote:
Peter Scott wrote:
I have often wished that digraphs were not bundled with variables in this
respect, i.e., I wanted to put a string containing \n inside single quotes
just 'cuz it didn't contain variables to be interpolated. Whether there's
a way of improving
This and other RFCs are available on the web at
http://dev.perl.org/rfc/
=head1 TITLE
Builtin: lazy
=head1 VERSION
Maintainer: David Nicol [EMAIL PROTECTED]
Date: 17 Aug 2000
Version: 1
Mailing List: [EMAIL PROTECTED]
Number: 123
=head1 ABSTRACT
Clazy is suggested as a keyword
This and other RFCs are available on the web at
http://dev.perl.org/rfc/
=head1 TITLE
Sort order for any hash
=head1 VERSION
Maintainer: David Nicol [EMAIL PROTECTED]
Date: 17 Aug 2000
Version: 1
Mailing List: [EMAIL PROTECTED]
Number: 124
=head1 ABSTRACT
Herein a new syntax is
This and other RFCs are available on the web at
http://dev.perl.org/rfc/
=head1 TITLE
Ensuring Perl's object-oriented future
=head1 VERSION
Maintainer: John Siracusa [EMAIL PROTECTED]
Date: Aug 16 2000
Version: 1
Mailing List: [EMAIL PROTECTED]
Number: 126
=head1
85 matches
Mail list logo