map { $_*2 } @numbers;
I don't see a comma or = in there at all ;-)
Lexical Scope
The authors would prefer that try, catch, and finally blocks
share the same lexical scope.
A few of us random commentators agree with this as well.
my $cents = 2;
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
"this
thing causes this thing" interpretation.
Okay, I'm just registering my opinion that I don't like it. :-)
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
On Wed, Aug 16, 2000 at 11:49:03AM +0100, Graham Barr wrote:
if any of the catch or finally throws, it is caught by a
try {} block up the stack.
Keep It Simple
What he said.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
s to have exceptions?
Could someone enlighten me or point me at relevant references?
thanks,
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
jects under-the-hood,
then we could have:
for $a (@array) { print "$a is at $a-index\n"; }
No, I'm not wild about that either, but it's an idea.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
what about continue blocks? We can attach them to bare blocks,
but not to do blocks? That's weird.
However, I really don't want to see 'return' become a kind of 'last'
for do{}. How would I return from a subroutine from within a do loop?
Indeed.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
On Wed, Aug 09, 2000 at 07:26:29PM +, Nick Ing-Simmons wrote:
Graham Barr [EMAIL PROTECTED] writes:
On Wed, Aug 09, 2000 at 11:41:42AM -0500, Jonathan Scott Duff wrote:
How about this?
open '/etc/passwd'; # file
OK
open '/usr/local/bin/'; # directory
t operator
No discussion of a proposal to spell "print(LIST)" as "LIST".
I'll discuss it now--Ick! End of discussion. :-)
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
same:
open "/var/log/mylog";
open "file:///var/log/mylog";
open "file:///var/log/mylog", { mode = 'APPEND' };
Here's a translation of the last http and the above file opens:
http-open("http://www.perl.com", { mode = 'POST' }, %args);
file-open("file:///var/log/mylog", { mode = 'APPEND' });
What do you think?
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
On Tue, Aug 08, 2000 at 11:44:10PM +0200, Bart Lateur wrote:
On Tue, 8 Aug 2000 16:32:26 -0500, Jonathan Scott Duff wrote:
I sincerely hope you really mean "Let's make ``open() or die''
optional" Exceptions should be integrated into the language but Ye
Olde "returns undef o
atal error.
What does this buy us? What is the benefit?
=head2 static
Methods not marked as such should return a fatal error if called
directly on the class.
Again, where's the benefit?
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
On Mon, Aug 28, 2000 at 08:12:22AM -0700, Nathan Wiger wrote:
Jonathan Scott Duff wrote:
I think that Csubst is too syntactically close yet semantically far
from Csubstr that the evil demons of confusion will rear their ugly
heads.
I agree too, any suggestions are welcome. The fact
a = @b =~ /pattern/g; # equivalent to ...
@a = grep { /pattern/; } @b;
Also, it'd be nice if
@a =~ s/foo/bar/g;
did something similar.
Comments?
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
for
that being The Way.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
e
previous RE, then they should have saved it somewhere. This would
eliminate the "major" RE-engine changes to make $P1 work. But it
would require that the p52p6 translator make some really smart
modifications.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
to Cuse strict 'vars'; to get lexicals
by default and this one says we shouldn't have to?
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
that I'd hesitate to take away from the
programmer.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
d.conf file.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
On Wed, Aug 02, 2000 at 08:45:04AM -0600, Tom Christiansen wrote:
Anything one chooses potentially conflicts with the user's namespace, but
probably save() or temp() would be better, or even savetemp() or tempsave()
or scopetemp().
How about deliver() or preserve()?
-Scott
--
Jonathan Scott
()
or scopetemp().
How about deliver() or preserve()?
I can slightly grok the latter, but not the former. What are you
thinking there?
Ah, I was thinking of save() and how it could be deliverance.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
y Perl
Do we need an RFC for this? Seems like this is more of a "guiding
concept" that should be intergrated into everything. Just my opinion.
Well, it can't hurt to have a document to look at every now and then
to remind us what Perl should look/feel like.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
ome state we can get at. This thing would
encapsulate $!, $?, and friends. Modules (like DBI) could even add state,
but it would still be false.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
if (want eq 'array') { return @{$hash{vector}} }
elsif (want eq 'scalar') { return $hash{vector]-[0] }
elsif (want eq 'handle') { return $hash{filehandle} }
/me patiently awaits all those RFCs (or are we calling them PCRs now,
and won't that confuse the biotechnologists?) from Damian Conway.
-Scott
'; # tell the world I want a hash?
want = 'Foo'; # tell the world I want a Foo?
sub foo : want(Foo,hash,Dog), need(Foo) {
# foo() wants a Foo, hash, and Dog in that order
# foo() needs a Foo (must have)
}
okay, I've gone tangential ...
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
On Fri, Aug 04, 2000 at 01:37:09AM -0500, J. David Blackstone wrote:
=head1 IMPLEMENTATION
Csave
If I had my druthers, save() would be it.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
erl starts looking more like lisp than perl, I'll be
here to yell bloody murder! along with Simon :-)
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
" too? That would make sense to me,
but the semantics of "last odds" or "redo odds" escape me. Perhaps
"last odds" would me "evaluate the block labeled by odds, then exit
the switch" and "redo odds" would me "re-evaluate this case, then jump
to the block labelled odds".
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
On Sat, Aug 05, 2000 at 12:04:30PM +0200, Bart Lateur wrote:
On Fri, 4 Aug 2000 10:54:16 -0500, Jonathan Scott Duff wrote:
Csave
If I had my druthers, save() would be it.
I'm against it. Why? Because it suggests that all it does is save the
value for later retrieval. It does
that's what
$fh = open $fh;
does.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
_bar could still work though.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
have as
many BEGIN blocks as you want and each time perl thinks it's the first
one.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
On Tue, Aug 08, 2000 at 09:27:24AM +0100, Piers Cawley wrote:
Proposal to utilize C* as the prefix to magic subroutines
I freely accept that this is not anything approaching a reasoned
critique but:
Yecch!
That comment is as good as any :-)
-Scott
--
Jonathan Scott Duff
[EMAIL
ddition of
newlines on and off. How about a new lexical pragma--newlines?
use newlines;
print "Hi"; # Automatically adds the newline
no newlines;
print "Hi"; # Does NOT automatically add the newline
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
and/or named
currying with _1, _2, _3 and/or _foo, _bar, _baz.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
by
something like this:
$fh = open "foo" or die;
$fh-auto_chomp = 1;# Insert some appropriate syntax
$fh-newline = "\n";# Insert some appropriate syntax
while ($fh) {
...
}
close $fh;
-Scott
--
s while
reading from a single stream.
As an aside:
How do we get at the magic filehandle or its settings. Would we
usurp $ARGV to be the object and $ARGV-filename to do what $ARGV
currently does?
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
f course we could define chomp() to have an optional first argument
that is the filehandle to do the chomping on too. These sorts of
decisions will have to be made on a per-subroutine basis rather than
having some global $/ that affects many different subroutines.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
thingy.
If the line it chomps isn't coming from a file, where does it come
from? (s/file/any form of IO/ because that's what we're really
talking about)
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
or something like that. the global aspect was meant
to show it was the default for ALL new handles. i don't care if it is in
$/ or some new place.
Yes, yes, you are right ... I was suffering from perl 5 myopia.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
On Tue, Aug 08, 2000 at 05:15:24PM -0400, John Porter wrote:
Jonathan Scott Duff wrote:
If we had a context coercion operator that was the opposite of want()
we could do something like this:
print context '*STRING', $val; # long-hand for print $val
print context '*SCALAR
programs may need translating anyway. They just might be
translated on-the-fly by perl6 and all you'd have to do is add a
command line switch or add "use Perl5;" or maybe absolutely nothing at
all.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
ow provide an anonymous sub to date()
that will tell date() the proper offset from GMT for "localtime" if
we're going to support that concept at all.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
' { ... }
case 'Socket' { ... }
... # else code
}
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
On Mon, Aug 14, 2000 at 01:46:55PM -0400, Lipscomb, Al wrote:
While the implicit change works on most (if not all) situations it would be
nice to have a way to control the conversion.
Sounds like an RFC to me :-)
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
have
to be modified to understand mjdate() output?
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
On Mon, Aug 14, 2000 at 02:42:39PM -0400, Dan Sugalski wrote:
At 01:36 PM 8/14/00 -0500, Jonathan Scott Duff wrote:
On Mon, Aug 14, 2000 at 06:13:13PM -, Perl6 RFC Librarian wrote:
=head1 TITLE
Maintain internal time in Modified Julian (not epoch)
How would this be stored
the language level, I don't care how
it's done :-)
my $i = 100_000_000_000_000_000;# big number!
$i += 100_000_000_000_000_000; # even bigger!
print "$i\n"; # Oh my gosh, it worked!
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
of a scalar (after all,
constancy is a property of the scalar), better the attributes should
be verbose and explicit.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
n"' -ne 'print((split/:/)[0])'
Ick.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
--
Jonathan Scott Duff
[EMAIL PROTECTED]
On Tue, Aug 15, 2000 at 10:03:55AM -0700, Nathan Wiger wrote:
Jonathan Scott Duff wrote:
Well, now it's my turn to suggest something ;- How about we give
perl the ability to look for a .perlrc file? (Yes, I know the reasons
against, but everything is up for grabs now right
not, print it as
it stands.
Isn't that the way perl4 did it? I don't know what agony lwall and
friends went through that made them change this behaviour though. It
would be good for someone who does to speak up about it.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
it) always; same with Cprintf(). I'd hardly call that
"default" though.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
ll (! in prolog)
(Note the only prolog I've done was about 10 years ago for about 2 weeks
and about 2 years ago for 2 or 3 weeks in a programming languages class
at a university)
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
I come to save the day!\n" for ($PERL::STDOUT, $myfh);
And again, if you want to print different stuff to different
filehandles, you know how to use the
print FILEHANDLE LIST;
version of print.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
of the world.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
, but
@a = \($a, $b, $c);
is equivalent to
@a = (\$a, \$b, \$c);
rather than what you wrote.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
ently" work where maybe they shouldn't. Whether a sub
should be lvaluable should be a conscious decision made by the
subroutine author.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
(BLOCK3) {
B4: unless (BLOCK4) {
return "false"
} else { goto B3 }
} else { goto B2 }
} else { goto B1 }
}
return "true"
As for examples where this would be of be
ar context.
$_ = "foofoofoofoofoofoofoo";
$count = m/foo/g;
1 is just as true as 7.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
to a hash from a list.
What happens to $_ and @_? How do I get the arguments passed to a
sub?
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
the thing
being assigned. Are you saying that in
somesub = $value;
the subroutine Csomesub, being lvaluable by default is free to use
or ignore $LVALUE? If so, how does one detect errors? When
Csomesub is ignoring $LVALUE the above would silently fail, yes?
-Scott
--
Jonathan Scott Duff
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
On Wed, Aug 16, 2000 at 12:44:50PM -0400, John Porter wrote:
Jonathan Scott Duff wrote:
Gee, I'd hate to lose simple assignment to a hash from a list.
foo %= bar;
Hmm, I think I need to write an RFC!
I'll give you my comments right now ... It seems we are eliminating
stop people from treating arrays and hashes differently if
the trivial notational differences are removed?
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
would be needed. As for $a[$something], if @a had been declared as
"my @a : assoc;", then perl should stringify $something, otherwise
numify. Hmm.. I guess this implies that all hashes need to be
pre-declared. :-(
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
-at-a-distance, Perl has never stood
in the way.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
t see RFCs for. Am I missing them, or do they need
to be written up?
RFC away!
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
.
Passing the lvalue via some other means eliminates this problem. I
forget who suggested it (Buddha Buck?) but
sub foo : lvalue($value) { ... }
where $value is a reference to the thing we're assigning seems like a
Good Idea to me.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
rson{$_[0]}, " ", $person{$_[1]};
}-('firstname', 'lastname');
# becomes
print "Howdy, ", $person{'firstname'}, " ", $person{'lastname'};
(If that's what people meant, I didn't see anyone actually say it).
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
a generic iterator. (Unless you really
want the iterator to compute the next in sequence on each iteration)
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
^ syntax
would fail on this...
Good point. But who's to say that ^{total - female} doesn't work?
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
willing souls who may be able to express them as you would in
the form of an RFC. Similar with the modules. It'd be a shame to
lose your (IMHO) valuable contributions to the Perl 6 effort.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
precision as far
as your floats or doubles can carry you.
But make the core language easily accessible to everyone.
Funny, that's the exact argument I would use *against* mjdate().
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
tub.
Just to clarify, you're proposing that ellipsis do this in void
context only, right? I kind of like the existing ... operator just
the way it is (unless it has changed behind my back).
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
is:
sub keys {
my %hash = @_;
return keys %hash;
}
Ah, convert is argument to a hash then grab the keys of that hash.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
ot; I guess.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
Scott Duff
[EMAIL PROTECTED]
Perl's motto is TMTOWTDI and
that's not by accident.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
ssion were it was declared. That doesn't work. It's not
the same variable.
Perl is starting to feel more like C in this instance :-(
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
need.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
ot; I mean translate from start/end until you find a
character not matching. Then you can do nifty things such as:
Um, that would radically change the meaning of tr///. Better to use
s/^// and s/$//.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
On Tue, Sep 19, 2000 at 09:23:00AM +0300, Ariel Scolnicov wrote:
I'm planning to withdraw RFC184 ("Perl should support an interactive
mode"), due to lack of interest.
I'd say leave it in. What could it hurt?
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
},[@_]] }, [], @singles };
Separation:
$sorted = reduce { push @{$_[0][$_[1]%2]}, $_[1]; $_[0] }
[[],[]],
@numbers;
I don't understand this one.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
On Wed, Sep 20, 2000 at 07:31:35AM +1100, iain truskett wrote:
* Jonathan Scott Duff ([EMAIL PROTECTED]) [20 Sep 2000 07:15]:
On Tue, Sep 19, 2000 at 07:29:56PM -, Perl6 RFC Librarian wrote:
=head1 TITLE
Builtin: reduce
[...]
Separation:
$sorted = reduce { push
expressions
much more legible.
Indeed.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
but 6 or 7 of the OSes that Perl has
been ported to)
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
herders. (Watch
how they get bit and don't do the same ;-)
I'll revise the RFC to add 'readable()', 'writable()', and such
synonyms for -r and -w that are more like 'use english' and less like
'use English'.
Excellent.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
) { ... }
Indeed it would.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
.
Note that if #1 is adopted, $foo in "split $foo, $str" will no longer
really mean "split /$foo/, $str".
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
ersing
all of that seems so unprimitive.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
not suggest SDF instead of XML? SDF addresses most of POD's
deficiencies whill still retaining readability. (I don't have a URL
for SDF handy, but I'm sure a quick search on google.com would turn it
up)
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
Lindermann was introduced.
Could someone give me a pointer to the whys and wherefors of the
change from quicksort to mergesort?
thanks,
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
://dev.perl.org
All will be made clear there.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
s.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
"quick and dirty", it's called
"-e"
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
of the learning curve. This is a Good Thing.
MHO,
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
that http://... example. But let him digest those beans
completely and we'll see what he comes up with.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
On Fri, Apr 06, 2001 at 03:32:56PM -0400, John Porter wrote:
Jonathan Scott Duff wrote:
Doesn't look like another namespace, but rather an extension of an
existing one to me.
An extension of a namespace? What's that?
Either "modifiers" will be symbols in an existing
ts to
do should be completely independent of any perl 6 code.
So ... when a "perl6" program uses a "perl5" library, what happens?
If we go with Larry's rule that a package declaration unambiguously
says you're parsing perl 5, then this situation WILL exist.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
1 - 100 of 408 matches
Mail list logo