ct .pairs to return pairs, not keys and values zipped.
Re each, I don't know what to expect: a single pair, or all pairs. Not
what .kv does, anyway.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
ean.
> Which often looks like madness until you realize that it's just a
> reflection of how most hackers think. ;-)
This calls for a poll, because I believe nothing of this "most".
Hackers on this list, what do you think?
Juerd
--
http://convolution.nl/maak_juerd_blij.ht
number number
stringnumber join
scalarnumber ref
This huge difference in how smart an array is makes it kind of
useless to take Perl 5 as an example of how arrays should behave in Perl
6, because that would also dictate that "foo" ~ @bar end in the number
of elements in @bar. B
s
> bluish red ;-)
We can do better than equivalence testing for colors. Instead, try to
match. Surely a *smart* match operator really is smart?
$color ~~ '#FF00FF'
==
$color ~~ 'magenta'
==
$color ~~ [ 255, 0, 255 ]
Juerd
--
http://co
y IS confusing!
It is NOT TRUE that strings with variables interpolated are always for
presentation.
It is NOT TRUE that uninterpolated strings are always for storage.
Both can be used either way, and in practice are used both ways.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
f it without reading a book.
Yes, if things are different, they should be really different.
For this reason I want ~$foo and +$foo be different where something
making sense can be thought of and implemented without much effort, and
pairs to evaluate to something OTHER than their values (the
a protocol. In fact, I
cannot think of any object class that would have multiple possible
stringifications, and none of them obviously more important than others.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
t strings so you
> can customize it, including ways to change the defaults for a class
> (like the separator for arrays of pairs being "\n" instead of ' ').
Just the way I imagined it. Great!
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
context, both
return the number of elements.
> BTW, does everybody expect more than one prefix numerifyer beeing
> redundant or is there an idea of (+ (+ @foo)) beeing modelled
It's providing context to something that was already providing context.
A bit redundant indeed.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
split should be called "chunks" and
behave as described in this message.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
the global
state of syntactic flip flops makes me be afraid of using them in subs.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
TSa skribis 2005-09-26 19:39 (+0200):
> Sorry, I'm totally out of scope to what 'the flipflop operator' is.
> Could you be so kind to give some hints. Thanks in advance.
http://perldoc.perl.org/perlop.html#Range-Operators
Juerd
--
http://convolution.nl/maak
TSa skribis 2005-09-26 20:32 (+0200):
> Does someone consider this 'inner boolean state' and the 'magical
> auto-increment algorithm if the operands are strings' of the Perl5
> range op a feature worth preserving?
Yes, many someones do.
Juerd
--
http://convolution
be. That's why the equivalent of $& will be
usable without any frowning.
> Grtz, Ruud
K vnd grtz n btj mljk t lzn, n d z mt ntrljk n s zjn.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
r me, the most noticeable difference is the time spent thinking and
writing: for replies it's short, for new messages, it's long.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
What should zip do given 1..3 and 1..6?
(a) 1 1 2 2 3 3 4 5 6
(b) 1 1 2 2 3 3 undef 4 undef 5 undef 6
(c) 1 1 2 2 3 3
(d) fail
I'd want c, mostly because of code like
for @foo Y 0... -> $foo, $i { ... }
Pugs currently does b.
Juerd
--
http://convolution.nl/maak_juerd_blij.h
nnot know whether a list is finite?
my @foo = slurp ...; # lazy, but can be either finite or infinite
my @bar = 1..10;
say @foo Y @bar; # ?
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
$xyzzy { ... }
And even though
for @foo Y @bar Y @baz -> $quux, $xyzzy { ... }
is something you will probably not see very often, it's still legal
Perl, even though it looks asymmetric. This too makes finding the
solution in arguments a non-solution.
Juerd
--
http://convolution.nl
Luke Palmer skribis 2005-10-06 14:23 (-0600):
> my role is_default {} # empty
> sub foo($a, ?$b = 0 but is_default) {...}
Would this work too?
0 but role {}
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
uot;hello" can't in a useful way be coerced to a number
If it dies because of b, very good. If because of a, I think we have a
huge difference of opinion regarding automatic coercion.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
Exception
"hello 5 worlds"?
/^<...>/ perhaps?
And I think we should match against Num, not Int, as it's very hard to
have a rule that matches just integers. 0.5e3 is an integer, but 0.5e-3
is not.
As stated in my previous message, I think that all numbers should be
parsed t
Yuval Kogman skribis 2005-10-07 12:53 (+0200):
> On Fri, Oct 07, 2005 at 12:42:01 +0200, Juerd wrote:
> > For my Int $c = $float, though, I'd want coercion.
> > And I think it is wrong to have such a huge difference between literals
> > and values: if a variable coerces,
Miroslav Silovic skribis 2005-10-07 13:07 (+0200):
> Can an inline role be named?
> 0 but role is_default {}
This is a nice idea. It would require named roles (and to really be
succesful, also classes, subs, methods, ...) declarations to be
expressions, but I see no downside to that.
seconds. It's nice to get all the certain failures during compile
> > time.
> How about in unreachable code (which I do actually believe compilers can
> detect some of the time)?
I'm quite ambivalent about this.
Juerd
--
http://convolution.nl/maak_juerd_bli
turn &bar;
> }
> foo(42).(); #
Does this mean that this Perl 5 snippet no longer does the same in Perl 6?
{
my $foo = 5;
sub bar {
return $foo;
}
}
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/mak
ARGS or something like that to be a *-able array that
will be guaranteed to be compatible with the current sub's signature.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
foo(([EMAIL PROTECTED]));
foo ([EMAIL PROTECTED]);
This doesn't allow for combining named and positional pairs. I do not
think that is necessary at all, for arrays. I think that combining
the two on the same level is a recipe for disaster anyway, and should
perhaps even emit a w
Juerd skribis 2005-10-10 15:20 (+0200):
> only pairs on the topmost level of arguments (not in any parens) are
s/not in any parens/not in any grouping parens/, to exclude .()
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution
is very arguable.
(Very little sidenote: parameters are expected, arguments are passed. In
the signature, you have parameters, in the call, you have arguments.
However, in the case of a named argument, it does make some sense to
call the name parameter and the value argument, resulting in having
lso indicates, confusing at best.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
nfix and circumfix
parts. Please leave the parens for grouping (and in calls: breaking
recognition).
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
an
on making these available through a web interface soon.
There are no data backups for feather. I am considering weekly backups.
Do you think they are needed?
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
Alfie John skribis 2005-10-12 15:28 (+1000):
> Does Perl6 support multiline comments?
All incarnations of Perl have allowed us to begin multiple subsequent
lines with the comment glyph '#'. I am sure Perl 6 will not break this
tradition.
Juerd
--
http://convolution.nl/maak_juerd_b
a feature to trans entire strings? i.e. 'foo'
=> 'bar', where foo is a single thing replaced by bar. Does this not
exclude any possibility of specifying ranges in strings?
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
ot;Perl 5-ism" can be construed as
positive or negative. Please do elaborate.
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-10-18 11:57 (-0600):
> It looks nicer if you use the indirect object form:
> trans "string": [
> => "0",
> ];
It'd also look very nice with optional parens:
"string".trans [ => "0" ]
encoding. In
that case I suggest the "lit" operator that provides Str::Literal
context&coercion, which coerces to any other string type without
encoding.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
gt; it can't always be easily re-encoded. Encoding functions should therefor
> > check if a variable does safe::(none()) and warn or fail if so.
> I don't see how this relates to the OP, or why encoding functions
> should implement it like this.
The "should" is
DBI;
use MyDBI as DBI;
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
Larry Wall skribis 2005-10-19 1:43 (-0700):
> On Tue, Oct 18, 2005 at 04:43:57PM +0200, Juerd wrote:
> : dot sigils are not actually special. They are required on has-variables
> : and forbidden on all other. Changing them to be optional is trivial, or
> : so I hope.
> Dot sigils
This takes away my objections to the dot twigil entirely.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
nal keyboards?
3. What is the ASCII equivalent?
4. Why not ^, which is available?
5. Why is the sigil needed? Pairs do well without, too.
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-10-20 17:03 (+0200):
> 3. What is the ASCII equivalent?
Suggestion: 1c
'c' is an invalid character in numbers, and currently only numbers can
begin with a digit.
1cFoo
The 1 provides an extra visual hint of the cheapness of the class.
J
Juerd skribis 2005-10-20 17:03 (+0200):
> 4. Why not ^, which is available?
Or the euro symbol, which also has a C in it. It doesn't always have to
be American ;) It's in iso-8859-15, which is compatible enough with
iso-8859-1 to support ¥ and both « and ». (I hope those turn out
will have its equivalent too.
(It's ^KCt in vim, btw)
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
Larry Wall skribis 2005-10-20 8:46 (-0700):
> On Thu, Oct 20, 2005 at 05:35:10PM +0200, Juerd wrote:
> : I'm sure ¢ will have its equivalent too.
> c| or C| maybe.
But
sub c { ... }
sub d { ... }
if $foo eq c|d { ... }
Juerd
--
http://convolution.nl/maak_juerd_
Schneelocke skribis 2005-10-20 18:00 (+0200):
> Would c! be an option?
In current Perl 6: Yes, because infix ! does not exist.
But several people want ! to be a chainy none() constructor, and this
would destroy a dream.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution
gestion instead of just telling us
> why our ideas don't work in very specific circumstances, feel free.
I've already suggested two. Is that not enough?
(a) ^
(b) 1c
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
oks like h (hash).
I dislike things like "$calar" and "@rray", and now some people will use
"¢lass" in examples.
Please let that the sigil looks like a certain leter not be a reason.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
eady overstepping a boundary. It's perfectly normal to have one
glyph do very different things according to how/where it's used.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
Steve Peters skribis 2005-10-21 6:07 (-0500):
> Older versions of Eclipse are not able to enter these characters. That's
> where the copy and paste comes in.
That's where upgrades come in.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_
fore Perl
6 is released.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
not wrong,
not confusing and mostly: not a new idea.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
hing about it before it's too late.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
Daniel Hulme skribis 2005-10-24 9:00 (+0100):
> FEAR: I will need a lobotomy before I can make sense of Perl 6!
This falls under "hard to learn".
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
already expressed in:
FEAR: Perl 6 will not be used as much as Perl 5 was!
Also, I'd like to keep the fear descriptions short :)
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
t
the same as the Perl 5 community is now.
My take on that is that it is because Perl 6 is not a new version of
Perl 5. I still think "Perl" is a misleading name, and mostly hurts the
image of the language that is created here.
Juerd
--
http://convolution.nl/maak_juerd_blij.htm
foo foo";
given ($subject) {
s/foo/bar/; # "bar foo foo"
++; # "bar foo fop"
x= 2;# "bar foo fopbar foo fop"
~= "!"; # "bar foo fopbar foo fop!"
}
Especially bare ++ would be useful, I
Joshua Gatcomb skribis 2005-10-25 8:30 (-0400):
> IIRC, Andy has taken up the Perl6 PR hat. I think Juerd should like be
> working with Andy on this one. The rebuttals to these fears needs to be well
> thought out and convincing because from my personal experience they are
> prevalent
ink the latter is more elegant, without reducing legability or
maintainability. I also think that the code is immediately obvious, even
to people coming from Perl 5, who never read this thread.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
#x27;s
> face it: $_ already covers 95% of cases, my hypothetical var would cover I
> guess a remaining 4.5% of cases, and who cares for the rest? E.g.:
> for @vert {
> put_point $_, $__ for @horiz;
> }
I find $__ confusing, and prefer $OUTER::_, which already exists.
Juerd
--
"\${ "OUTER::" x $n }_" }
];
}
And then you can use $_1 .. $_9. I think $_1 is much clearer than $__,
but I think neither is needed in the standard language.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
not with 6.0.0, if
what you're waiting for is a small thing to implement...
Things that can wait are usually very non-trivial, and have little
impact on the rest of the language.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
# 1's complement of number of T instances
Ehm, isn't that +^, ~^ (and ?^, perhaps) nowadays?
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
needing a one() junction for types, by the way. If
someone can come up with a good real-life example, please do so.)
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
Jan Dubois skribis 2005-10-25 12:33 (-0700):
> Just something to keep in mind in case you are tempted to use the Won
> sign as a sigil or operator in the future.
I don't know what stitch() will do, but this will have to be its infix
operator :)
zip ¥ Y
stitch
datory parameters get "+", then why do optional
parameters not get "-"?
# The mandatory/optional thing could even be postfix, which results in
# clearer code than the stacked "+:$":
#
# sub foo ($this!, $is!, :$mandatory!, $optional?, $really?)
I do lik
e or less very heavily associated with invocants
anyway.
Hmmm...
method .doit (...) { ... }
method $foo.doit () { ... }
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
on.
I just really wouldn't like : to have two very differentmeanings in very
similar places.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
have a class export a sub to its "use"r.
class A {
has $.b handles { 'show' => 'say' };
eval "sub $?CLASS is export { $?CLASS.new(\$?ARGS) }";
}
Not sure about the existence of $?ARGS, or how else to write it. Well,
@_,
e
same thing, I wouldn't have felt the need to use both :)
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
Sam Vilain skribis 2005-11-03 11:01 (+1300):
> Does ++; mean &postfix:<++> or &prefix:<++> ?
I no longer think $_ defaulting for mutating ops is a good idea, but to
answer your question, read the original post: all these would imply the
LHS, so that makes ++ po
his buy me all that 10k% more functionality, or would have been a
> _simpler_ design, say "only" 1k% more complex be enough?
I love the OO system, and although it adds to complexity, I believe the
functionality gained is much greater. However, I do not see why we need
to add three ugly opera
The Perl 6 Summarizer skribis 2005-11-04 14:34 (+):
> $_ defaulting for mutating ops
Probably I have not been clear enough about that I no longer think this
is a good idea.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
h
onvert (:$from, :$to, :$thing is rw) { ... }
I think the complexity of signatures is much less than that of doing the
same things without them, with the extra benefit that even beginners
will (almost) instantly understand most of it!
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
I hadn't noticed this change, but I like it.
I've updated the PM node :)
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
, I have to object. Such combination
doesn't work well in my brain. I'd prefer:
%bins.clear;
%bins.pairs = ...;
Although I think the current situation with simple assignment is still
much better:
%bins = ...;
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
ry even time.
Would something like that be possible? Wanted? Not too costly?
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
Ruud H.G. van Tol skribis 2005-11-20 1:19 (+0100):
> Maybe
> "\x{123a 123b 123c}"
> is a nice alternative of
> "\x{123a} \x{123b} \x{123c}".
Hmm, very cute and friendly! Can we keep it, please? Please?
Juerd
--
http://convolution.nl/maak_juerd
r, for example:
@foo Y @bar Y @baz
> (What is Perl's pair terminology, by the way?)
A Pair has a key and a value. To retrieve the key, use the .key method,
to retrieve the value, use the .value method, to retrieve a list of
both, use the .kv method.
Juerd
--
http://convolution.nl/maa
; $foo, $bar { ... }
looks, and don't quite like
for @foos Y @bars -> [ $foo, $bar ] { ... }
as much.
> (Or does for no longer automatically take as much elements from the
> input array as needed?
I like the arity-sensitivity solution better, I think.
Juerd
--
http://convo
Larry Wall skribis 2005-11-21 12:08 (-0800):
> Unfortunately, though,
>
> would be ambiguous, and/or wrong.
Well, we could of course change "-" to mean "-1 or fewer", as "+" means
"+1 or more"... :D
Juerd
--
http://convolut
the same rule could be used for .., but then for consistency,
whitespace on its RHS would need to be disallowed.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
o use indexes, but [EMAIL PROTECTED] doesn't return an
index.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
Larry Wall skribis 2005-11-23 9:19 (-0800):
> ^5.each { say }
Without colon?
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
n
of lazy strings is an interesting one. It would be very useful, and
would also allow GREAT things like
my $revfoo := reverse $foo;
$revfoo ~~ s/foo/bar/g;
I wonder if it's doable, though...
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
ame as that of @foo.last.
That almost all arrays range from 0..i is no reason to write bad code.
> Maybe someone doing
> for ([EMAIL PROTECTED])->$i { say @foo[$i] }
That should be ^(@foo.last + 1), or not using ^ at all. I'd prefer the
latter.
Juerd
--
http://co
nconsistent, but with @, it cannot be copied, because that flattens in
list context, which is provided by assignment to another @-thing.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
t, that of "the number of elements" is
.elems, or [EMAIL PROTECTED] If you need the last index, plus one, you shouldn't
use the number of elements, and if you need the number of elements,
minus one, you shouldn't use the last index. Am I the only one who cares
about this dis
Juerd skribis 2005-11-24 0:39 (+0100):
> Personally, I think even ^.., ^..^ and ..^ are too much, but that I can
> live with.
For the record, I don't want to die if ^ is introduced. If it's there,
I'll use it. If using [EMAIL PROTECTED] becomes accepted style, I'll use
have .i -- "i" for
"index" is accepted abbreviation, isn't it? (Think for (i = 0; ...;
...))
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
IL PROTECTED] returning a list of indexes, if that
is
the definition. I do object to [EMAIL PROTECTED] meaning [EMAIL PROTECTED],
which happens
to return a list of indexes for most arrays.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://co
ducing another unary operator?
++
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
> my $x = 0; my @y = 1..9; [EMAIL PROTECTED]; print "$x\n"; print "@y\n"
The @ sigil does not create list context.
In general, every $foo[$bar] from Perl 5 can be written as @foo[$bar] in
Perl 6. @foo[$bar++]++ is neither weird nor wrong. Ugly, yes, that it
is.
Juer
TSa skribis 2005-12-05 12:32 (+0100):
> IIRC, the default is to be a read-only ref. Not even local modifications
s/ref/alias/, which you can see as an implicit or automatic reference,
but which we usually don't call that.
Juerd
--
http://convolution.nl/maak_juerd_blij.h
Brad Bowman skribis 2005-12-09 20:14 (+0100):
> $str ~~ my m/ mv @files:=+ $dir:= /
> Nah, that's ugly.
It's mostly ugly because you're not used to it, I think.
my m[mv @files:=+ $dir:=] ~~ $str;
Looks nicer, though.
Juerd
--
http://convolution.nl/maak
oes, then wouldn't it be just a bit too silly to stick to {}
being a hash?
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
c is under kind control ;)
Autovivification is always predictable.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
. Perhaps this can be determined
using some attribute, that for a referenced hash defaults to the
opposite of what it defaults to for a literal anonymous hash.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
gt; $range.max, and would be surprised if they meant anything
else.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
501 - 600 of 712 matches
Mail list logo