On Mon, Jan 16, 2006 at 02:38:14PM +0800, Audrey Tang wrote:
: -BEGIN PGP SIGNED MESSAGE-
: Hash: SHA1
:
: I'm almost sure this had been covered before, but I failed to find a
: reference in either the archives or in synopses, so here goes again:
:
: sub f ($x) {
: sub g ($y)
On Fri, Jan 13, 2006 at 11:42:13PM +, Luke Palmer wrote:
: On 1/13/06, Dave Whipp [EMAIL PROTECTED] wrote:
: What happens if I simply abandon the attempt at anonymous MMD and use a
: named multi-sub, instead:
:
: {
: my multi sub process_arg(-f, Str $f is rw) {
:$f .=
On Fri, Jan 13, 2006 at 10:33:23PM +, Luke Palmer wrote:
: In perl 5:
:
: my @a = (1,2,3);
: delete $a[1];
: print exists $a[1];
:
: This is false, whereas $a[0] and $a[2] do exist. This is creepy. Not
: only is it creepy, it raises a whole bunch of questions with
: nontrivial
On Thu, Jan 12, 2006 at 08:29:29PM +, Luke Palmer wrote:
: The only remaining problem is that we have no syntax for ...3, which
: doesn't make sense as a list, but does make sense as a range.
Well, it could be a lazy list that you only ever pop, I suppose.
In any event, it doesn't work
On Tue, Dec 27, 2005 at 01:13:10PM -0500, Rob Kinyon wrote:
: On 12/27/05, Larry Wall [EMAIL PROTECTED] wrote:
: On Tue, Dec 27, 2005 at 12:10:45AM -0500, Rob Kinyon wrote:
: : Creating an array whose positions are aliases for positions in another
: : array can be useful. How about
On Tue, Dec 27, 2005 at 12:10:45AM -0500, Rob Kinyon wrote:
: Creating an array whose positions are aliases for positions in another
: array can be useful. How about
:
: my @s := @a[0,2,4] is alias;
:
: @a[2] = 3; # @s[1] == 3
: @s[1] = 4; # @a[2] == 4
:
: The default slicing
On Sat, Dec 24, 2005 at 11:25:43PM +1100, Andrew Savige wrote:
: Apologies if I'm Mr Magoo, but I did a bit of a search on this just now, and
: uncovered little more than a pithy quote from Piers Cawley in:
:
: http://dev.perl.org/perl6/list-summaries/2005/p6summary.2005-07-05.html
:
: asserting
On Thu, Dec 22, 2005 at 03:19:03PM -0800, Jonathan Lang wrote:
: As a third possibility, could we huffman-code do nothing clauses by
: leaving out the appropriate argument? That is:
:
: while $x-- some_condition($x);
:
: or
:
: loop ( ; some_condition($x) ; $x--);
We could, except that
I think that deep copying is rare enough in practice that it should
be dehuffmanized to .deepcopy, perhaps with optional arguments saying
how deep. Simple shallow copy is .copy, whereas .clone is a .bless
variant that will copy based on the deep/shallow preferences of the
item being cloned. The
On Sat, Dec 17, 2005 at 12:12:15PM -0800, Ashley Winters wrote:
: Explicitly nil values wouldn't warn or fail on activities which undef
: does. nil is basically a value which is simultaneously '' and 0 and
: 0.0 and false *and* defined, and allows itself to be coerced with the
: same rules as
On Fri, Dec 16, 2005 at 01:29:11PM +0100, Ruud H.G. van Tol wrote:
: John Macdonald:
:
: [trans]
: If a shorter rule is allowed to match first, then the longer
: rule can be removed from the match set, at least for constant
: string matches.
:
: It is not about the length of the rules, but
On Fri, Dec 16, 2005 at 09:14:52AM -0800, Larry Wall wrote:
: It would be a useful exercise to write tr/// in terms of s///.
: It occurs to me that it'd be awfully useful to have a kind of hash
: that returns any unmatched key unchanged.
Actually, in this case it's handled by the fact
On Tue, Dec 13, 2005 at 12:42:47PM +0200, Gaal Yahas wrote:
: S11 stipulates:
:
: * modules can decorate exports with tagsets
:
: * module users are the ones who control which imports are allowed,
: and what scoping to give each import. The default is always lexical.
:
: There are a few
On Thu, Dec 15, 2005 at 06:50:19PM +0100, Brad Bowman wrote:
:
: Hi,
:
: S05 describes an array version of trans for transliteration:
: ( http://dev.perl.org/perl6/doc/design/syn/S05.html#Transliteration )
:
: The array version can map one-or-more characters to one-or-more
: characters:
:
On Thu, Dec 08, 2005 at 11:16:52PM -0500, Rob Kinyon wrote:
: On 12/8/05, Larry Wall [EMAIL PROTECTED] wrote:
: [snip] Certainly, as you speculate, if different authors want
: to share an API, they can give it an API author that knows how to
: delegate to one of the authors.
:
: Would you
On Thu, Dec 08, 2005 at 11:14:16PM +0100, Brad Bowman wrote:
: Hello,
:
: I'd like to get clarification on the scoping of variables
: bound in a regex. It's described in S05 as follows:
:
: External aliasing
:
: * Instead of using internal aliases like:
:
: m/ mv @files:=ident+
or something like that could also
: help.
Sure, but some of our toys are bigger than others. :-)
: Is there such a Perl5-Perl6 translator underway?
:
: Larry Wall is working on using the perl (5) interpreter to create
: compiled output (as opposed to just something that executes in
: memory) that can
On Wed, Dec 07, 2005 at 09:43:31AM +0100, TSa wrote:
: HaloO,
:
: Larry Wall wrote:
: My gut-level feeling on this is that $! is going to end up being an
: env variable like $_.
:
: I just re-read about exceptions. Well, I undestand now that $! is
: intented as a variable with a spectrum
On Thu, Dec 08, 2005 at 01:46:51PM -0500, Rob Kinyon wrote:
: As for the original question, I think that the Perl 6 grammar will
: be a much better example for how to parse other languages than a
: Perl 5 grammar would be, since one of the underlying design currents
: from the beginning has
On Thu, Dec 08, 2005 at 01:10:14PM -0600, Jonathan Scott Duff wrote:
: The same holds for parsing perl6 only the twisty maze isn't there (or is
: at least much much smaller)
Hmm. Maybe...
Perl 5 is a twistly maze of passages all different.
Perl 6 is a twistly maze of passages all
It's probably not entirely clear in the spec, but it is already the
intent that version numbers work as API designators as well as module
designators. Certainly, as you speculate, if different authors want
to share an API, they can give it an API author that knows how to
delegate to one of the
My gut-level feeling on this is that $! is going to end up being an
env variable like $_. (If you don't know what env is then you've
not read the conjectural parts of S2 lately.) Then the problem reduces
to what you do with an unhandled $! at the end of a lexical scope,
which is probably just to
On Thu, Dec 01, 2005 at 10:54:14AM -0500, Rob Kinyon wrote:
: I just read the slides about CAPerl (http://caperl.links.org/) and it's an
: interesting idea. Leaving aside the question of whether this would work in
: Perl5 or not, I think it would be very interesting to look at building this
:
On Wed, Nov 30, 2005 at 06:36:22PM +, Piers Cawley wrote:
: $fh = open '', 'quotefile' or fail;
: $fh.print 'EOQ'
: I like witty sayings as much as the next guy, but wit can hurt when
: misdirected. If people want me to be machine for cranking out quote
: file fodder, I'll do my best. But I
On Thu, Nov 24, 2005 at 12:08:44AM +0100, Stéphane Payrard wrote:
: What about array with holes as supported by Parrot?
We have prior art with hashes, but it's not clear how well that maps
across.
: Does .elems return the number of elements with or without
: the holes?
In Perl 5, non-existing
On Thu, Nov 24, 2005 at 12:42:25PM +0100, Juerd wrote:
: Ruud H.G. van Tol skribis 2005-11-24 10:36 (+0100):
: it's about expression.
: Also if [EMAIL PROTECTED] is the multi-dimensional index zip?
:
: No.
:
: However, it does feel weird to have an *operator* that makes an array
: behave in a
On Wed, Nov 23, 2005 at 02:23:51PM +0100, Ruud H.G. van Tol wrote:
: Larry Wall:
:
: for ^5 { say } # 0, 1, 2, 3, 4
:
: The 'for' can go if a list (and also an array) would imply looping, when
: it is positioned next to a block:
:
: a. say (0..4);
: b. { say; say } (0..4);
: c. (0..4
On Wed, Nov 23, 2005 at 11:58:23AM -0500, Rob Kinyon wrote:
: Here's an issue - if ^$x would be one($x), then what will [EMAIL PROTECTED]
be? To
: me, that seems like it should be one(@x), which is entirely useful.
: Except, if I try and use it as [EMAIL PROTECTED] (which, to me, would be
On Wed, Nov 23, 2005 at 11:55:35AM -0500, Matt Fowles wrote:
: I think using C ..5 to mean (0, 1, 2, 3, 4) would be a more
: sensible option. Makes sense to me at least.
That doesn't derive well from any of:
..
^..
..^
^..^
If the rule is you can omit the 0, then it's ..^5
On Wed, Nov 23, 2005 at 07:10:39PM +0100, Juerd wrote:
: Ruud H.G. van Tol skribis 2005-11-23 19:03 (+0100):
: Doesn't ^5 encourage [EMAIL PROTECTED] too much?
: Can you explain when that creates a problem?
:
: It's not about problems in execution, it's about expression.
:
: [EMAIL PROTECTED]
On Wed, Nov 23, 2005 at 10:45:21AM -0800, Mark A. Biggar wrote:
: Actually I like that and think that ^$x should be 0..($x-1) and that
: [EMAIL PROTECTED] should be define to return the array's index set (usually
: 0..$#foo) but maybe something else for a non-zero based array.
Well, as I said
On Wed, Nov 23, 2005 at 10:58:53AM -0800, Larry Wall wrote:
: Well, as I said in my other reply, that's not a big problem for
: 1-dimensional arrays. But it does possibly make sense that ^ on a
: multidimensional array or hash would return a zip of all the key sets.
: Plus it generalizes ^%hash
On Wed, Nov 23, 2005 at 12:07:08PM -0500, Rob Kinyon wrote:
: On 11/23/05, Flavio S. Glock [EMAIL PROTECTED] wrote:
: OTOH, it would be nice if
:
:say substr( ~(1..Inf), 0, 10 )
:
: printed 1 2 3 4 5.
: This would work, I think, if ranges were convertable to iterators,
Range objects are
On Wed, Nov 23, 2005 at 05:24:11PM -0200, Flavio S. Glock wrote:
: Ah, ok - but I believe that say() is slurpy, which means the list must
: be instantiated first.
It's * instantiated, but not ** instantiated, so the iterators buried
in the .specs of the list aren't forced to evaluate yet. And
On Wed, Nov 23, 2005 at 08:35:09PM +0100, Juerd wrote:
: Larry Wall skribis 2005-11-23 11:16 (-0800):
: Range objects are supposed to *be* iterators, but pugs isn't there yet,
: last I checked.
:
: Is the associated sigil @ or $? Either way, there's a problem.
No, either way it does what you
On Wed, Nov 23, 2005 at 02:21:15PM -0500, Matt Fowles wrote:
: I like C ..^5 better than C ^5 actually. I was going for the
: rule that an omitted LHS was 0 and an omitted RHS was infinity (your
: probably cannot omit both).
But that only saves you 1 keystroke, and eliminates unary .. for any
On Wed, Nov 23, 2005 at 08:04:32AM -0800, Peter Scott wrote:
: On Tue, 22 Nov 2005 14:34:12 -0800, Larry Wall wrote:
: What tipped me over the edge, however, is that I want ^$x back for a unary
: operator that is short for 0..^$x, that is, the range from 0 to $x - 1. I
: kept wanting
On Mon, Nov 21, 2005 at 11:25:20AM -0600, Patrick R. Michaud wrote:
: On Mon, Nov 21, 2005 at 09:02:57AM -0800, Larry Wall wrote:
: : There's also sp, unless someone redefines the sp subrule.
:
: But you can't use sp in a character class. Well, that is, unless
: you write
On Tue, Nov 22, 2005 at 10:12:00AM +0100, Michele Dondi wrote:
: Oh, I'm not the person you were responding to, and probably the less
: entitled one to speak in the name of everyone else here, but I feel like
: doing so to say that in all earnestness I'm quite sure no one took any
: offense out
On Tue, Nov 22, 2005 at 08:19:04PM +1100, Damian Conway wrote:
: And perhaps we'd want a general form for specifying other
: pattern syntaxes; i.e., :perl5 and :glob are shortcuts for
: :syntax('perl5') and :syntax('glob') or something like that.
:
: Agreed.
But the language in the following
On Tue, Nov 22, 2005 at 09:46:59AM -0800, Dave Whipp wrote:
: Larry Wall wrote:
:
: And there aren't that many regexish languages anyway. So I think :syntax
: is relatively useless except for documentation, and in practice people
: will almost always omit it, which makes it even less useful
On Tue, Nov 22, 2005 at 12:48:39PM -0600, Patrick R. Michaud wrote:
: On Mon, Nov 21, 2005 at 09:02:57AM -0800, Larry Wall wrote:
: On Sun, Nov 20, 2005 at 10:27:17AM -0600, Patrick R. Michaud wrote:
: : On Sat, Nov 19, 2005 at 06:32:17PM -0800, Larry Wall wrote:
: : We already have, from A5
On Tue, Nov 22, 2005 at 09:31:27AM +0200, Gaal Yahas wrote:
: In pugs, r7961:
:
: my @pats = /1/, /2/;
: say MATCH if 1 ~~ any @pats; # MATCH
: say MATCH if 0 ~~ any @pats; # no match
:
: So far so good. But:
:
: my $junc = any @pats;
: say MATCH if 1 ~~ $junc; # no
I'm changing my mind about type sigils. After playing around with ^
for a while, I find it's useful only in signatures and declarations,
and I'm generally forced to omit it when using it within inner
declarations, or it would redeclare the type. Taking that together
with the fact that it
On Sun, Nov 20, 2005 at 10:27:17AM -0600, Patrick R. Michaud wrote:
: On Sat, Nov 19, 2005 at 06:32:17PM -0800, Larry Wall wrote:
: On Sun, Nov 20, 2005 at 01:26:21AM +0100, Juerd wrote:
: : Ruud H.G. van Tol skribis 2005-11-20 1:19 (+0100):
: : Maybe
: : \x{123a 123b 123c
On Mon, Nov 21, 2005 at 05:49:59PM +0100, Ruud H.G. van Tol wrote:
: Larry Wall:
: Juerd:
: Ruud:
:
: 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?
:
: Thanks for the support
On Mon, Nov 21, 2005 at 09:02:57AM -0800, Larry Wall wrote:
: But I'd like to reserve for delimiting what is returned by $,
: the string officially matched:
:
: foo bar baz ~~ /:w foo \w+ baz/
: say $/; # foo bar baz
: say $; # bar
Though it occurs to me that there's another
On Mon, Nov 21, 2005 at 03:51:19PM +, Luke Palmer wrote:
: On 11/21/05, Ingo Blechschmidt [EMAIL PROTECTED] wrote:
: Of course, the compiler is free to optimize these things if it can prove
: that runtime's statement_control:if is the same as the internal
: optimized statement_control:if.
:
On Mon, Nov 21, 2005 at 10:45:56AM -0800, Larry Wall wrote:
: Another issue in if optimization is whether the blocks in fact do
: anything blockish that have to be scoped to the block. This is a
: determination that Perl 5 makes when it's compiling blocks. It's
: basically an attribute
On Sun, Nov 20, 2005 at 09:11:33PM +0100, Ingo Blechschmidt wrote:
: Also, is specifying other, non-slurpy arguments prior to a slurpy
: @;multidim_arglist legal?
Yes, though we have to be careful about what happens when we bind the
entire first dimension and then get a == boundary. That's
On Mon, Nov 21, 2005 at 03:48:30PM +, Luke Palmer wrote:
: To illustrate:
:
: sub foo ([EMAIL PROTECTED]) {
: say [EMAIL PROTECTED];
: }
: sub bar (*@;a) {
: say +@;a;
: }
: foo(1,2,3; 4,5,6); # 6
: bar(1,2,3; 4,5,6); # 2
:
: That is, the regular
On Mon, Nov 21, 2005 at 07:49:16PM +0100, Ingo Blechschmidt wrote:
: Aha! FYI, I got that interpretation from r6628 of S09 [1]:
: The following two constructs are structurally indistinguishable:
:
: (0..10; 1,2,4; 3)
: ([0..10], [1,2,3,4], [3])
Sorry, started revising that one a
On Mon, Nov 21, 2005 at 02:05:31PM -0500, Rob Kinyon wrote:
: This is very close to a proposal I made to the ruby-dev mailing list
: (which was Warnocked). I proposed a very basic engine that would work
: with the parser/lexer to determine what action to take instead of
: using the huge case
On Mon, Nov 21, 2005 at 07:57:59PM +0100, Ruud H.G. van Tol wrote:
: There is a [[:alpha:][:digit:] and a [[:alpha:][:digit]] on the
: A5-page.
Hmm, well, thanks--I went to fix it and I see Patrick beat me to
the fix. But in one of the updates, it says:
+[Update: Actually, that's now
On Mon, Nov 21, 2005 at 11:43:21AM -0800, Larry Wall wrote:
: Let's see, where did I put my stash of generic quotes?
I would like to publicly apologize for my remarks, which were far too
harsh for the circumstances. I can only plead that I was trying to
be far too clever, and not thinking about
On Sun, Nov 20, 2005 at 08:51:03PM +0100, Ingo Blechschmidt wrote:
: Hi,
:
: according to the new S03, till is the new name for the flipflop
: operator.
Presuming we can make it work out as an infix macro.
: Do the flipflop operators of subroutines maintain own
: per-invocation-of-the-sub
On Thu, Nov 17, 2005 at 01:55:31PM -0800, Ovid wrote:
: In http://perlmonks.org/?node_id=509413 (in response to
: http://perlmonks.org/?node_id=509256), Rob Kinyon wrote that in his
: understanding of Perl 6 Roles, anything a role can do the class doing
: the role should also be able to do.
:
:
On Sun, Nov 20, 2005 at 01:26:21AM +0100, Juerd wrote:
: 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?
We already have,
On Thu, Nov 17, 2005 at 10:05:55PM -0700, Luke Palmer wrote:
: On 11/17/05, Joshua Choi [EMAIL PROTECTED] wrote:
: But what does that mean for ='s signature? What type would be its
: first parameter? Would you call it infix:{'='}:(Bareword | Any,
: Any) or something like that? And in any case,
On Fri, Nov 18, 2005 at 12:12:02PM +0100, TSa wrote:
: I hope all these are now the same:
:
: foo = bar ; # result of evaluating bar available under foo key
: :foo( bar );
: :foobar ; # does that exist?
No. :foo with trailing whitespace is taken to mean :foo(1), so the
bar would
On Fri, Nov 18, 2005 at 03:31:10AM +0200, Ilmari Vacklin wrote:
: Hi all,
:
: I think that grep should be renamed to something English and more, well,
: semantic. 'Filter' comes to mind as a suggestion. I realise there's a
: lot of cultural background (from Unix and Perl 5) that favours 'grep',
:
On Fri, Nov 18, 2005 at 06:54:42PM -0200, Flavio S. Glock wrote:
: 2005/11/11, Larry Wall [EMAIL PROTECTED]:
:
: While you're there, also think about the gray area between arrays and
hashes,
: and whether .[...] subscripts are just a specialized form of .{...}
subscripts.
:
: By the way
On Thu, Nov 17, 2005 at 10:18:19PM +0100, TSa wrote:
: Another idea is to model nums to have a directional bit where the
: polar complex have a full range angle.
This whole thing strikes me as a units problem. Much like we
don't care if the internal representation is meters or furlongs,
so long
On Fri, Nov 18, 2005 at 01:41:33PM -0800, Brent 'Dax' Royal-Gordon wrote:
: Larry Wall [EMAIL PROTECTED] wrote:
: The name is relatively unimportant in the overall scheme of things.
: I'm more worried about the fact that it's difficult to partition a
: list into multiple lists in one pass
On Thu, Nov 17, 2005 at 10:56:27AM +0100, Daniel Brockman wrote:
: That problem is not specific to this feature. For any package
: that changes the syntax, you can ask what about eval?
:
: So... what *about* eval? :-)
Always parses with the parser in effect at that point, the same one you'd
get
On Tue, Nov 15, 2005 at 02:11:03PM -0500, Aaron Sherman wrote:
: All of that is fine, as far as I'm concerned, as long as we give the
: user the proviso that chained buts might be optimized down into a single
: cloning operation or not at the compiler's whim, but it could be a nasty
: shock if
On Tue, Nov 15, 2005 at 12:32:38PM -0600, Patrick R. Michaud wrote:
: On Tue, Nov 15, 2005 at 10:26:05AM -0800, jerry gay wrote:
: Thus, while PGE::Match currently defines a C__get_pmc_keyed_int
: method, it's doesn't yet define a C__get_string_keyed_int method.
: So, a statement like
:
:
On Tue, Nov 15, 2005 at 03:43:59PM -0500, John Macdonald wrote:
: On Tue, Nov 15, 2005 at 11:23:49AM -0800, Larry Wall wrote:
: On Tue, Nov 15, 2005 at 02:11:03PM -0500, Aaron Sherman wrote:
: : All of that is fine, as far as I'm concerned, as long as we give the
: : user the proviso
On Sat, Nov 12, 2005 at 03:05:53PM +0100, Stéphane Payrard wrote:
: Larry Wall a écrit :
: | On Fri, Nov 11, 2005 at 08:42:44AM -0500, Joe Gottman wrote:
: | : Do functions like map and grep, which in Perl5 return lists, return
: | : Iterators in Perl6?
: |
: | A list may contain iterators
On Fri, Nov 11, 2005 at 06:21:53AM +, Luke Palmer wrote:
: Just some initial thoughts and syntax issues. I'll come back to it on
: the conceptual side a little later.
:
: On 11/10/05, Jonathan Lang [EMAIL PROTECTED] wrote:
:
: class complexRectilinear {
:has $.x, $.y;
:
: Hmm, that
On Fri, Nov 11, 2005 at 08:42:44AM -0500, Joe Gottman wrote:
: Do functions like map and grep, which in Perl5 return lists, return
: Iterators in Perl6?
A list may contain iterators. Lists don't eagerly flatten in Perl 6.
: Can an Iterator be passed to a function (like map and grep again)
:
On Wed, Nov 09, 2005 at 01:45:21PM +0100, TSa wrote:
: So, why not call the thing what it is---a set *type* declarator!
:
: set SmallInt of Int where { abs 10 };
:
: set SomeNums of Num = (3.14, 4, 89, 23.42);
:
: set Bit of Int = (0,1);
Interesting idea. I expect a bit of interference
On Thu, Nov 10, 2005 at 10:11:50AM +0100, TSa wrote:
: HaloO,
:
: Gaal Yahas wrote:
: I know why the following doesn't work:
:
: given $food {
: when Pizza | Lazagna { .eat }
: when .caloric_value $doctors_orders { warn no, no no }
: # ...
: }
:
: The
On Mon, Nov 07, 2005 at 08:44:28PM +0100, TSa wrote:
: HaloO,
:
: Larry Wall wrote:
: : ::Takes3Ints ::= :(Int,Int,Int -- Any);
: :
: : my foo:(Takes3Ints);
:
: I'd say that has to be something like:
:
: my foo:(Takes3Ints:);
:
: or maybe one of
:
: my foo
On Sat, Nov 05, 2005 at 11:35:38AM -0800, Jonathan Lang wrote:
: First off: is there a way to declare a method as being private to a role?
We're still batting around the notion of private methods. Certainly
with a lexically scoped sub you can get most of the same benefit.
Trust could then
On Mon, Nov 07, 2005 at 01:05:16PM +0100, TSa wrote:
: With the introduction of kind capture variables ^T we could complety
: drop the subtype special form. As you pointed out the adding of constraints
: happens with the where clause anyway. Thus we return to the usage of the
: compile time name
On Mon, Nov 07, 2005 at 09:37:04AM -0800, Larry Wall wrote:
: It would be nice to generalize this sufficiently to be able to declare
: polymorphic objects resembling match objects:
:
:my $matchobj(Poly: Key^Int^Notthere -- Any);
:
: Or maybe that should be:
:
:my $matchobj\(Highlander
On Sun, Nov 06, 2005 at 03:10:40PM +0100, Ingo Blechschmidt wrote:
: Hi,
:
: my ($key, $value) = key val;
: my $pair = ($key = $value);
:
: $pair.key = new;
: # Should this fail (cannot modify a constant)?
: # Should this update $pair.key, but leave $key untouched?
:
On Mon, Nov 07, 2005 at 11:53:26AM -0800, Larry Wall wrote:
: Also, if we provide a way to return a pair instead of a value from a
: hash (currently done with the new :%hashkey syntax),
Whoops, I forgot I changed that to %hash:key (and %hash:{'key'} too).
Larry
On Mon, Nov 07, 2005 at 09:51:39PM +0100, Juerd wrote:
: Or let's take this simple example:
:
: sub convert (:$from, :$to, :$thing) { ... }
:
: That isn't quite my %args = @_;. Yes, that works, but the only real
: way we keep doing it is that the full solution sucks in plain Perl 5:
:
:
On Mon, Nov 07, 2005 at 11:20:39PM +0200, Ilmari Vacklin wrote:
: On Mon, Nov 07, 2005 at 12:05:30PM -0800, Larry Wall wrote:
: On Mon, Nov 07, 2005 at 11:53:26AM -0800, Larry Wall wrote:
: : Also, if we provide a way to return a pair instead of a value from a
: : hash (currently done
On Sat, Nov 05, 2005 at 01:55:11AM +0100, TSa wrote:
: Larry Wall wrote:
: The notion of constraints or limitations is already conveyed by
: where, and some subtypes may just be aliases.
:
: Wouldn't 'bound' work? Perhaps combined with 'on':
:
: bound SmallInt on Int where { 0 $_ 100
On Fri, Nov 04, 2005 at 12:37:04PM +0100, TSa wrote:
: The above also describes my perception of the $. twigil notation which
: are variables bound through the invocant(s). My mental picture beeing
: one where a method is instanciated as a not yet invoked sub after selecting
: the target code body
On Fri, Nov 04, 2005 at 08:14:11PM +0100, TSa wrote:
: HaloO,
:
: Larry Wall wrote:
: On Tue, Oct 25, 2005 at 10:25:48PM -0600, Luke Palmer wrote:
: : Yeah, I didn't really follow his argument on that one. I, too, think
: : that the one() junction in general is silly, especially for types
On Thu, Oct 27, 2005 at 01:30:44PM -0600, Luke Palmer wrote:
: On 10/27/05, Yiyi Hu [EMAIL PROTECTED] wrote:
: What I want to do, is a bit like...
:
: class A {
: has $.b;
: method show { $.b.say };
: };
:
: A( b = 5 ).show;`
:
: Yes, I definitely want this to be the way that case type
On Thu, Oct 27, 2005 at 05:37:13AM -0400, Rob Kinyon wrote:
: Will I be able to do something like:
:
: package Foo;
Hmm, you just started in Perl 5 mode.
: $*VERSION = 1.3.2;
Perl 5 would get confused here, so I'm presuming Perl 6. But Perl 6
isn't likely to let you override the global
On Wed, Oct 26, 2005 at 09:36:48AM +0200, Michele Dondi wrote:
: On Tue, 25 Oct 2005, Larry Wall wrote:
:
: But we're trying to design the OO features (indeed, all of Perl 6)
: such that you can usefully cargo cult those aspects that are of
: immediate interest without being forced to learn
I should point out that one of the major changes in the most recent
S6 is that named arguments are now marked by : rather than +, with
:foo($bar) being the way to declare parameter $bar but give it the
external name of foo. A + is now reserved to mark mandatory
parameters, though it's redundant
On Tue, Oct 25, 2005 at 10:25:48PM -0600, Luke Palmer wrote:
: Yeah, I didn't really follow his argument on that one. I, too, think
: that the one() junction in general is silly, especially for types.
Well, I think it's silly too. I'm just trying to see if we need to
reserve the syntax in case
On Wed, Oct 26, 2005 at 10:06:25AM -0400, Matt Fowles wrote:
: Larry~
:
: On 10/26/05, Larry Wall [EMAIL PROTECTED] wrote:
: So we'd get:
:
: :@array[42] 42 = @array[1]
:
: Do you mean C :@array[42] 42 = @array[42] ?
Yes. I was changing it because 42 : 1 :: foo : a, but I flubbed
On Wed, Oct 26, 2005 at 04:02:06PM +0200, Juerd wrote:
: Larry Wall skribis 2005-10-26 6:44 (-0700):
: I should point out that one of the major changes in the most recent
: S6 is that named arguments are now marked by : rather than +, with
: :foo($bar) being the way to declare parameter $bar
It also means you could write a prototype that looks like
:(!, !, !, ?, ?)
We don't need no stinkin' _. There's more than one way to not care.
(I guess that means that in addition to supporting interesting values
of undef, we also support interesting values of not caring...)
But does that
On Tue, Oct 25, 2005 at 05:17:40PM -0400, Stevan Little wrote:
: Larry,
:
: On Oct 25, 2005, at 4:37 PM, Larry Wall wrote:
: On Mon, Oct 24, 2005 at 06:33:20AM -0700, Ashley Winters wrote:
: : # behavior through prototype -- guessing realistic syntax
: : Base.meta.add_method(
: : do_it
On Wed, Oct 26, 2005 at 04:59:04PM +0200, Juerd wrote:
: Larry Wall skribis 2005-10-26 7:31 (-0700):
: One slightly serious ramification of the : switch is that the space
: is required after the colon indicating a null invocant.
: method doit (: $a, $b, $c)
:
: Or, we could separate
On Wed, Oct 26, 2005 at 11:31:28AM -0400, Rob Kinyon wrote:
: That's just self.meta.add_method($label, $method) by my lights.
: A .meta already implies/ignores the .class coercion. If we are to
: support prototype-based programming $x.meta *must not care* whether
: it has been given a class
On Wed, Oct 26, 2005 at 12:22:07PM -0400, Stevan Little wrote:
:
: On Oct 26, 2005, at 12:05 PM, Larry Wall wrote:
: Of course, there are other words that are somewhat synonymous with
: class, Unfortunately sort is already hosed. Maybe kind.
:
: Actually kind is used in the Core Calculus
On Wed, Oct 26, 2005 at 07:06:15PM +0200, TSa wrote:
: HaloO,
:
: Larry Wall wrote:
: On Wed, Oct 26, 2005 at 04:59:04PM +0200, Juerd wrote:
: : Larry Wall skribis 2005-10-26 7:31 (-0700):
: : One slightly serious ramification of the : switch is that the space
: : is required after the colon
On Wed, Oct 26, 2005 at 03:54:35PM -0400, Rob Kinyon wrote:
: So maybe we can define our terms like this:
:
: type: a completely generic metaterm for any of the following,
: and then some.
:
: class: a mutable interface object that manages instances in the
: classical way,
On Wed, Oct 26, 2005 at 08:48:12PM -0400, Rob Kinyon wrote:
: If a role is an immutable class, that means that its internals cannot
: be changed. Hence, the compiler can trust that it will be the same at
: the end as at the beginning. Which means it's optimized. Which means
: my objects run faster
On Wed, Oct 26, 2005 at 04:56:23PM -0600, Luke Palmer wrote:
: Then ^T $x binds T to the kind of $x. And $x.kind == $y.kind asks
: if two objects are of the same type,
:
: Don't you mean $x.kind eqv $y.kind?
:
: Ugh.
Now that infix::: has come available, maybe I mean:
$x.kind :: $y.kind
701 - 800 of 2342 matches
Mail list logo