?!
$bar = 1; # updates $foo
$baz = 2; # does not update $foo
IMO, :=: should not auto(de)reference.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
Juerd skribis 2005-04-01 22:35 (+0200):
$foo :=: $bar; # true
$foo :=: $baz; # also true?!
IMO, :=: should not auto(de)reference.
s:g/:=:/=:=/
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
Thomas Sandlaß skribis 2005-04-01 23:37 (+0200):
Juerd wrote (with substitution applied):
IMO, =:= should not auto(de)reference.
So you expect $bar to contain value 2 and detach from $foo?
No. But if you said $baz instead of $bar, then yes.
How would one then reach the value in $foo
-references, it
should be spelled =\= instead, although I really question the practical
use of such operator.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
Bitshift, which one is it?
+
or
+
I believe only + is possible, because + has to be +«, but S03 is
still inconsistent, and + comes up everywhere, including Brent's
perl6op.txt.
Can there please be a definitive answer, and an update to S03?
Juerd
--
http://convolution.nl
, Python, you
would have to know how variables work in that language. Bluntly put,
that'd suck.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
For some reason, I keep typing :=: instead of =:=. Do other people
experience similar typo-habits with new operators?
One of my other Perl 6 typo-habits is ^H^Hargh!^H^H^H^H^H«, but that's
because I like how « and » look, but can't yet easily type them.
Juerd
--
http://convolution.nl
Terrence Brannon skribis 2005-04-04 18:45 (+):
So, to avoid confusion with the common understanding of flattening in
Perl, perhaps it should be called spreading or distributing.
I agree.
Likewise, slurping is probably best explained as collecting.
Juerd
--
http://convolution.nl
for a matched pair? That's got a legacy in math, and
some mathematically-oriented languages.
It having meaning in maths is probably more a reason not to use, unless
the meaning is identical enough.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
wolverian skribis 2005-04-05 19:31 (+0300):
Does [EMAIL PROTECTED] DWIM, by the way? I'm not sure about the precedence.
Yes, . is supertight.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
() is one of those contexts that forces a deref. The only way
to call methods on the Ref itself is through var($ref), or whatever
it's called today.
This is weird.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl
and Hash were subtypes (or
whatever it's called) of Scalar, as Str and Num are, but then I'd start
to want a non-Perl name for Perl 6 again, because the language would
just not be Perl anymore.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http
!
I imagine that that has the same effect as
($x, $y) := ($y, $x);
($c, $d) := ($x, $y);
Of which I wonder if it can be written as
($c, $d) := ($x, $y) := ($y, $x);
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl
David Vergin skribis 2005-04-11 9:44 (-0700):
What's the word. Will there be something like use English?
Yes, and it's the default :)
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
, with lots and lots of committers,
because every one-man translation operation eventually dies.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
in several languages (as a different
project, so translation delays don't delay Perl releases)).
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
that isn't limited to any language.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
medium for that.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
Juerd skribis 2005-04-12 15:46 (+0200):
Please note that I try to not think about who's going to implement it at
all. That makes being creative and coming up with good ideas much, much
easier.
And to be honest, it makes coming up with bad ideas much easier than
that even :)
Juerd
--
http
, even between words. Handy :)
trim would be nice though, because I miss BASIC's ltrim and rtrim.
Perhaps those can be written as trim(:left) and trim(:right),
abbreviated to trim :l and trim :r?
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http
, SELECTing with ~~ is more useful:
%hash{ IO::Socket | IO::File | 'foo' }
%hash{ grep { %hash{$_}.does(IO::Socket|IO::File) || exists %hash{$_} },
%hash.keys }
So, what's the important downside of all this?
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl
then be everything except control
characters. Handy!
By the way, does ...5 mean -Inf..5? ;)
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
its function. Is the beep thing used enough?
(\cG still does that thing if \a is gone.)
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
actually dies.
No, Ucfirst it can't be, I think. And ALLCAPS is ugly. @ is taken (and
ugly). Suggestions?
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
;
ok my $foo = foo $bar baz; # warn about $bar, but not the masking
my $foo = ok foo $bar baz; # other way around
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
Paul Seamons skribis 2005-04-15 11:50 (-0600):
my %h = a 1 b 2 c 3;
{
temp %h{$_} ++ for %h.keys;
Just make that two lines. Is that so bad?
temp %h;
%h.values »++;
%h.say; # values are incremented still
}
%h.say; # values are back to original values
Juerd
--
http
$sql = q{...};
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
most.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
would be the same with Perl6. Notice that 'b' is
I'm imagining it will be different, as I expect temp to not hide the old
thing. I'm not sure it will.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
Paul Seamons skribis 2005-04-15 13:42 (-0600):
Each of the declarations my, our and local currently set the value to
undefined (unless set = to something).
That's not true.
use strict;
$::foo = 5;
our $foo;
print $foo; # 5
Juerd
--
http://convolution.nl
be spelled
dor. But it's too late for that, of course.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
Pasted from pugs/examples/cookbook/01-00introduction.p6:
# XXX - question: How equal are bunches of spaces to tabs?
# -- I'd say that's a question for perl6lang
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl
Aaron Sherman skribis 2005-04-15 18:20 (-0400):
Is there a ?ws-like thingy that is always \s+?
Not sure what that means exactly.
?ws is \s* or \s+, depending on its surroundings.
Thankfully, NBSP (U+00A0) is not Unicode whitespace.
Thanks for sharing this information!
Juerd
--
http
) to match any unicode whitespace, but letting it
: match NBSP and then using \s for splitting things is wrong, I think.
Perhaps the default word split should not be based on \s then.
It'd have to.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http
should go. I have
never seen them used in serious programming, and if they present a
problem with natural parsing, then why keep them around?
Obfuscation is nice, but let's not design the language around that.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl
in Perl 5, which equals
foo bar .
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
Aaron Sherman skribis 2005-04-17 18:23 (-0400):
On Fri, 2005-04-15 at 18:04 +0200, Juerd wrote:
throwawaytmpvar $sql = q{...};
throwawaytmpvar $sql = q{...};
I like the idea and propose a, aliased an for this.
Too short.
There is a rule of thumb, I don't know who came up
be done using map:
1..5 == map { get_next($_) } == @names;
or of course
@names = map { get_next($_) }, 1..5;
The XX was proposed mainly because the 1..5 part of map often does not
make sense as a range, and in those cases you just abuse it for
repetition.
Juerd
--
http
Juerd skribis 2005-04-20 19:09 (+0200):
I'm not sure the XX thing will happen, but if it does, it'd be most
useful if it wouldn't treat a sub call differently.
I forgot rationale.
It shouldn't treat a sub call differently, so that a called sub can in a
useful manner return a closure, which
/ {
say $_.id ~ ' - ' ~ $_.value;
}
What is the benefit of this syntax over having a simple function that
takes one argument, interpolating variables from CALLER::?
for sql 'SELECT * FROM table WHERE id=$id' { ... }
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http
with a
non-readonly undef ;) (This is something I can recommend to anyone:
redefining true, false and undef leads to very spectacular code, where
anything's possible, and defined(undef) can be a true that stringifies
as false.)
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http
Larry Wall skribis 2005-04-20 11:54 (-0700):
goto(join , L, { rand 10 } XX rand 10);
By the way -- Does this mean the XX operator is official now?
And what about X? It'd let you write the same thing without the join:
goto(L ~ { rand 10 } X rand 10)
Juerd
--
http://convolution.nl
)?
Same thing, as the inner comma is still in scalar context.
However, with list context, I expect things to flatten, so with a
signature of [EMAIL PROTECTED], it puts 5 elements in @_.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http
with pairs, but these words don't make
good identifier names.
Can something like this be done without resorting to macros with hard to
construct regexes?
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
exactly is the difference between Scalar and Any?
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
;
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
, there are all the other forms of open
and open parameters.
Just for the record, that's spelled $fh = open $file in Perl 6.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
library function that accepts
a filename automatically also accepts an open filehandle, which has a
thousand and one benefits.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
Aaron Sherman skribis 2005-04-22 10:00 (-0400):
On Fri, 2005-04-22 at 07:46, Juerd wrote:
Can we together compile a list of accepted abbreviations, so they can be
consistently applied?
Are you suggesting that these are accepted by the compiler or by us (for
discussion)?
By us. Mostly
Juerd skribis 2005-04-22 16:11 (+0200):
Those are for identifiers, so we don't end up with one function using :r
and another using :read. That'd be inconsistent.
Although readline should not be made rline, and I still think both :r
and :read should work!
Bool +$read is shortr
|/... or the awful MSIE variant
file://c:\foo\bar.
But I guess it's safe to treat single-letter schemes as Win32/DOS
volumes, as there are no single-letter URI schemes.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
replies).
Why were you just kidding? I think it's a great idea.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
sense, but that has something to do with me never understanding the
purpose of ::=.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
PROTECTED])
returns
Handle {...}
Where protocol(file) expands to file://
Yes, but it's probably easier to just use a hash: %protocolfile.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
probably easier to just use a hash: %protocolfile.
Easier or more efficient?
Yes.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
kinda like the IO::All module, except for how it overloads and .
my $page == io(http://www.wall.org/~larry;);
IO used in this way denies that there's non-stream-based IO too.
Waiting for a certain wire to get shorted is input too, as is writing
directly to graphic memory a form of output.
Juerd
Larry Wall skribis 2005-04-22 9:47 (-0700):
: my $page == io(http://www.wall.org/~larry;);
: IO used in this way denies that there's non-stream-based IO too.
How so? Where's the xor?
Good point.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl
will probably be fast too. We don't need C for speed ;))
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
for that matter. They should both topicalize using the
same semantics, IMO.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
. The problem with ..foo is less apparent because
you're likely to copy all the levels at once, and it's relative rather
than absolute.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
symbolically.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
[1]y; $x = 3; @a[0]x[1]y
3
Pass.
pugs my ($x, @a); $x := [EMAIL PROTECTED]; $x = 3
*** Error: Can't modify constant item
Pass, provided that [EMAIL PROTECTED] (@a.elems) is rvalue. If it's lvalue,
then @a
should grow to 3 elements instead.
Juerd
--
http://convolution.nl
references there are aref and href, but scalar and
subroutine references are not presented.
Because I have never seen them used as singleletterref yet. Probably
because sref would be highly ambiguous.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
else.
In array context, @foo is passed as the array that it is. In
list context, it is flattened. Big and very important difference.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
is harder to find.)
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
started
to realise and agree that having two things both called arrays or lists
was confusing. There are still some occurrences of array context left,
but in reality, even in Perl 5, that should only refer to the context in
which an array is expected, as provided by a \@ prototype.
Juerd
--
http
).
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
stuff, it is not, because we
want those things to be anonymous more often than the other things.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
is chosen
should be consistently applied to both syntaxes. Of course, the same
consistency prescripbes that $_ be that default...
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
).
The event being the topic makes sense only if all events are handled by
the same method, in which you use a dispatch table. But OO itself is a
pretty neat dispatching machine already.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http
is perhaps
better.
But use strict warnigs; looks great and I wonder if it can work.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
Assuming the following are true:
A: if is now a normal function
B: foo() + 3 is (foo) + 3, foo doesn't get 3.
Then does that mean we're stuck with:
C: if($foo) { say 'foo' } being a syntax error?
I currently think A is wrong. Am I right?
Juerd
--
http://convolution.nl
}
That is the goal - to find some nice variable that looks vaguely usable and
that people won't rebel against using.
Variable or alternative for the dot.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
temporary variable?
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
not.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
Nathan Wiger skribis 2005-04-25 13:35 (-0700):
My point is simply that we pick one or the other, instead of
both/aliases/etc.
But TIMTOWTDI. One way may be great for writing maintainable code, while
the other is useful in oneliners (including single line method
definitions).
Juerd
--
http
attractive, but I'm not sure if roles can be
anonymous and/or closures.
They can. But I think what you wrote is rather unnecessarily complex.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
of goto, to many's dismay (but not mine)).
Indirect method call on default invocant:
method: args;
Quoting:
qq:to/foo/ == say;
s:2nd/foo/bar/;
The latter can be fixed by requiring \w+:\s+, but the former I think
cannot.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http
the colon:
foo: for 1... {
next foo;
}
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
be useful, but it also makes great
documentation.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
-, by the way.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
Juerd skribis 2005-04-28 14:47 (+0200):
Yes, because a pair is an object (reference), and it's not the .value
that you're passing ro.
An example of what would go wrong:
for %hash.pairs.value - $value {
$value = ...;
}
But this will work:
for %hash.pairs.value
- as a whole before
trying to match . I wouldn't suggest actually parsing .* first and
then seeing if the .* happened to equal '-' :))
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
Luke Palmer skribis 2005-05-01 1:17 (-0600):
Umm... maybe I'm totally misunderstanding you, but I think it doesn't,
since I'm implementing statement:while, not statement:for.
Sorry, I wasn't clear enough. How would the same is lazy thing be
useful with for, given this example?
Juerd
--
http
...?
Or guess it, -T alike. Browsers do a great (but of course not perfect)
job at guessing. I want Perl to have such dwimmery too.
And what about IO layers? :)
I can imagine a similarity to sub wrapping: $fh.wrap(Class)
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl
associate with reading and with writing. If there's any association
at all, my guess is that it has to do with comparison or angle brackets.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
in the module that CGI.pm-:standard-ishly
pollutes the main namespace?
I don't think the command should default to $_
Eh...
Why?!
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
like the bareword-ish labels to go away)
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
was blessed already.
Which the oneliner side of you should find awful nice.
It does indeed!
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
? That
certainly fits in the sigil-is-part-of-the-name-thing.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
write it readably.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
= (R)+ @array;
I like that.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
Juerd skribis 2005-05-04 14:53 (+0200):
@foo == zip == @bar
H...
@quux
||
||
\/
@foo == zip == @bar
/\
||
||
@xyzzy
:)
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http
that the texas reduce is written @ instead.
Are there any infix:op where there is also a standalone op that would
confuse usage inside ()? If so, would it be too big a deal to
special-case those?
Maybe x?
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
, with weird unary or
listop parsing:
reduce(+) @array
That's ugly, but there's also the map-ish form, and I'd like that to
still be available.
reduce { $^a + $^b }, @array;
reduce infix:+,@array;
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl
:[ ]).
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
Juerd skribis 2005-05-04 15:18 (+0200):
I'm still against any explict scalar dereferencing, so: fail,
complaining about $x not being an arrayreference (not knowing how
to handle postcircumfix:[ ]).
Ehm :)
s/explicit/implicit/
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http
!!
+++[++-]+++.[-].
[-]-.---.+++[+++-].+
++[---]+..+++[+++-].+..+++[---]
.-.+...[+-]++.+++[--]
.+++[---]-.[-]+++..+.--
.++..+++[]+...+++[
-]+.+++[].
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
, then.
A normal filehandle can already handle bidirection.
I think the following solution suffices in a clean way:
$h = open a pipe;
Now,
$h.in;
$h.out;
$h.err;
$h.print(foo); # use $h.out
$l = $h.readline; # use $h.in
Juerd
--
http://convolution.nl
to have.
Compare this to Perl 5 and see how similar it is.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
201 - 300 of 653 matches
Mail list logo