Re: Perl 6 code - a possible compile, link, run cycle

2005-08-25 Thread David Storrs
On Aug 25, 2005, at 7:16 AM, David Formosa (aka ? the Platypus) wrote: On Wed, 24 Aug 2005 16:13:03 +0300, Yuval Kogman <[EMAIL PROTECTED]> wrote: [...] perl6 creates a new instance of the perl compiler (presumably an object). The compiler will only compile the actual file 'f

Re: How do you say another_sub(@_) in perl 6?

2005-08-28 Thread David Storrs
On Aug 28, 2005, at 5:52 AM, Yuval Kogman wrote: On Sun, Aug 28, 2005 at 05:18:42 -0400, David Storrs wrote: On Aug 28, 2005, at 5:12 AM, Yuval Kogman wrote: On Sun, Aug 28, 2005 at 05:02:25 -0400, David Storrs wrote: nested_call.wrap(), maybe? It's not 100% the same thing... Wrappi

Re: How do you say another_sub(@_) in perl 6?

2005-08-28 Thread David Storrs
On Aug 28, 2005, at 5:52 AM, Yuval Kogman wrote: oops... Can I forward our correspondence to the mailing list? Sure. I was wondering why you took it private. :> --Dks

Re: no 6;

2005-09-01 Thread David Nicol
On 9/1/05, Rafael Garcia-Suarez <[EMAIL PROTECTED]> wrote: > I just commited into bleadperl a patch that implements this : > > $ ./perl -e 'no 5' > Perls since v5.0.0 too modern--this is v5.9.3, stopped at -e line 1. > BEGIN failed--compilation aborted at -e line 1. > > That is, the e

Re: skippable arguments in for loops

2005-09-22 Thread David Storrs
On Sep 22, 2005, at 3:08 AM, Luke Palmer wrote: On 9/22/05, Carl Mäsak <[EMAIL PROTECTED]> wrote: FWIW, to me it looks fairly intuitive. undef here means "don't alias the element, just throw it away"... gaal joked about using _ instead of undef. :) Joked? Every other language that has pat

perl6-language@perl.org

2005-09-26 Thread David Storrs
On Sep 26, 2005, at 4:19 PM, Juerd wrote: Perl 5's $& is inefficient because of this. If the variable is used anywhere, Perl will for every regex used capture everything. My understanding is that this died with 5.10. Is that right? --Dks

seeing the end of the tunnel

2005-10-01 Thread David Storrs
So, I was thinking about how $Larry's original plan for doing the Perl6 design was something along the lines of "write a series of Apocalypses, one for each chapter of the Camel book". I know that the latest version of the Apocalypses are in SVN, but I checked dev.perl.org just to see what

Fwd: zip: stop when and where?

2005-10-04 Thread David Storrs
Both Luke and I missed the fact that my mail and his response went only to each other so, with his permission, here it is as a forward. --Dks Begin forwarded message: From: Luke Palmer <[EMAIL PROTECTED]> Date: October 5, 2005 1:48:54 AM EDT To: David Storrs <[EMAIL PROTECTED]>

Re: zip: stop when and where?

2005-10-05 Thread David Storrs
From: Luke Palmer <[EMAIL PROTECTED]> Date: October 5, 2005 1:48:54 AM EDT To: David Storrs <[EMAIL PROTECTED]> Subject: Re: zip: stop when and where? Reply-To: Luke Palmer <[EMAIL PROTECTED]> On 10/4/05, David Storrs <[EMAIL PROTECTED]> wrote: How about: @foo = (&

Re: zip: stop when and where?

2005-10-05 Thread David Storrs
On Oct 5, 2005, at 7:49 PM, Damian Conway wrote: Providing a :fillin() adverb on C is a suboptimal solution, because it implies that you would always want to fill in *any* gap with the same value. While that's likely in a two-way zip, it seems much less likely in a multiway zip. I actual

Re: Thoughs on Theory.pm

2005-10-13 Thread David Storrs
On Oct 13, 2005, at 6:45 PM, Dave Whipp wrote: I started thinking about the "in general, unverifiable programmatically" bit. While obviously true, perhaps we can get closer than just leaving them as comments. It should be possible to associate a unit-test-generator with the theory, so I ca

Re: Book RFC - Migrating to Perl 6

2005-10-15 Thread David Storrs
On Oct 15, 2005, at 7:39 AM, Rutger Vos wrote: Good idea. A fat new O'reilly tome will go some way to capturing mind share for perl6. Gathering ideas wiki-style is also very Web2.0. Perhaps perl6 could be marketed as such, what with the development style - "Perl6, the first Web2.0 program

Fwd: Renaming grep

2005-11-17 Thread David Storrs
Drat, thought I was sending this to the list: Begin forwarded message: On Nov 17, 2005, at 8:31 PM, 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

Modular versions and APIs

2005-12-07 Thread David Green
terface versions', but I think (for today, anyway) that we don't care much what goes in the API identifiers at all. The names don't even have to be explanatory (it works for Theorem::Pythagoras) -- we could rely on the module to supply a list of keywords to explain what it's for or to use in searching. -David

Re: handling undef better

2005-12-17 Thread David Green
le when trying to walk. It's just too low a level. Having an unknown/danger value, as well as the good ol' undef/none value, could be useful though. But I think you should have to deliberately use it ("my $x=unknown;") to show that something unnatural is going on. -David

Re: Junctions again (was Re: binding arguments)

2006-01-05 Thread David Green
;3 ..." and expect it to Do the Right Thing regardless of whether $x happens to be an ordinary number or a junction -- I have to split up the two cases and handle them separately. That's surely going to reduce the happy-go-lucky usefulness of junctions. Besides, don't we have a "no junctions" pragma that you can stick into any scope where you need exact mathematical purity? -David

Re: The definition of 'say'

2006-02-08 Thread David Green
ake an argument that the default OFS should be a space or a tab, but I think OFS="" and ORS="\n" are probably what most people want most of the time. That certainly fits my typical uses of 'print' and 'say'.) -David "say what?" Green

Re: Smart match table

2006-02-09 Thread David Green
ell, the ~~ table includes both: Any Code<$> scalar sub truth match if $b($a) Any Code<>simple closure truth match if $b() (ignoring $a) so if the code takes a single argument, it will use $a; if it doesn't, then, well, it won't. -

Implementation of :w in regexes and other regex questions

2006-02-13 Thread David Romano
verb were available, then I could have a rule that doesn't include two other rules: line:without(&&) { ^^ [.*] $$ } The rule above would match a line with a or , but not a line with both. Like I said before, I don't know if this is the best way to do stuff like this, or if I'm thinking about these problems the wrong way, so *any* help would be great. Thanks, David

Re: Implementation of :w in regexes and other regex questions

2006-02-14 Thread David Romano
On 2/14/06, Luke Palmer <[EMAIL PROTECTED]> wrote: > On 2/14/06, David Romano <[EMAIL PROTECTED]> wrote: > > I don't want to just skip tags wholly, because they do serve a purpose, > > but only in a particular context. (Can be changed back to a "default"

Re: s29 and Complex numbers

2006-02-28 Thread David Green
which you could choose to get lists or to get junctions when there's more than one possible result. (Perhaps if you , the default might be to return junctions or lists on the grounds that you're trying to be more mathematical?) -David

Re: comment scope

2006-03-14 Thread David Green
e Comments::Boxchars" line first. #==# # -David Green # #==#

Spaced Out (Was Re: [svn:perl6-synopsis] r8573 - doc/trunk/design/syn)

2006-04-06 Thread David Green
be more like ...+\s*...+ so you can say: foo[32], bar.[0], sphygmomanometry...[120/80]; -David "probably not serious about that" Green

Re: [svn:perl6-synopsis] r9575 - doc/trunk/design/syn

2006-06-12 Thread David Romano
On 6/11/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: (Operators that imply list operations are excluded: C<@>, C<%>, and C, for instance. Hyper operators are also excluded, but -post-assigment forms such as C is allowed.) +post-assigment forms such as C are allowed. while the nits are bei

Re: [svn:perl6-synopsis] r9575 - doc/trunk/design/syn

2006-06-12 Thread David Romano
isappeared. Yeah, my bad. I meant to have the paren after the period. Thanks :-) David

Re: Easy Str === Str question: what is a reference type

2006-07-12 Thread David Green
values? Because Perl 6 uses a false .id to signify a non-instantiated prototype, all instances should arrange to return a .id that boolifies to true. Does that mean all non-instances are equivalent? I can see that two non-existent Dog's might be considered the same thing, but not a non-existent Dog and a non-existent Cat. Or will $uninstantiated.id return something unique C? -David

Re: ===, =:=, ~~, eq and == revisited (blame ajs!) -- Explained

2006-07-13 Thread David Green
e something that doesn't have a name cannot, by definition, have the same name as something else... although even there, it arguably makes sense to consider equivalent anonymous values as "bound" to the same place. There's only one unique [1,2] in platonic heaven, I'm just mentioning it directly instead of dropping a name.) -David

Re: naming of the Str type

2006-08-13 Thread David Green
thing else "Str" could reasonably mean other than "string" (just as I don't think "regex" can very reasonably mean anything other than "regular expression"). -David

Re: ===, =:=, ~~, eq and == revisited (blame ajs!) -- Explained

2006-08-13 Thread David Green
; #true, same elements therefore same values $a =:= $d; #false, different variables $a === $d; #false, [EMAIL PROTECTED] and [EMAIL PROTECTED] are different refs $a eqv $d; #true, values of @x and @y happen to be the same -David

Re: ===, =:=, ~~, eq and == revisited (blame ajs!) -- Explained

2006-08-13 Thread David Green
Way back on 7/14/06, Larry Wall wrote: On Thu, Jul 13, 2006 at 10:19:24PM -0600, David Green wrote: [...] No, === is also deep. It's only shallower (or potentially shallower) in the sense that it treats any mutable object node as a leaf node rather than changing to "snapshot"

Re: ===, =:=, ~~, eq and == revisited (blame ajs!) -- Explained

2006-08-15 Thread David Green
On 8/14/06, Smylers wrote: David Green writes: Thanks for that. In summary, if I've understood you correctly, it's that: =:= two aliases to the same actual variable === one variable contains a copy of the other's actual contents eqv both contain contents which represent

=== and array-refs

2006-08-15 Thread David Green
On 8/14/06, Smylers wrote: David Green writes: I guess my problem is that [1,2] *feels* like it should === [1,2]. You can explain that there's this mutable object stuff going on, and I can follow that (sort of...), but it seems like an implementation detail leaking out. The curr

Re: === and array-refs

2006-08-16 Thread David Green
-offs are a fact of life. But nobody's actually said that, so I don't know whether I'm misunderstanding something still, whether I just haven't clearly explained what the heck I mean (or both, always a distinct possibility!). -David

Re: === and array-refs

2006-08-16 Thread David Green
that's a natural way to frame examples, but the language of examples doesn't seem to be that good for explaining the concepts. Whether stuff may or may not change isn't the point; what it comes down to is referring to a variable itself vs. evaluating it. -David

Re: === and array-refs

2006-08-16 Thread David Green
On 8/15/06, Darren Duncan wrote: At 2:51 PM -0600 8/15/06, David Green wrote: [...] You are right, but we have both Seq and Array types, so depending which one you use, you want either the === or eqv operators to do what you want. There is no reason that === should say 2 Array are equal; we

Re: === and array-refs

2006-08-16 Thread David Green
On 8/16/06, David Green wrote: $a=[1, 2, [EMAIL PROTECTED]; $c=[1, 2, [EMAIL PROTECTED]; $d=[1, 2, [EMAIL PROTECTED]; $a =:= $c; #false, different variables $a === $c; #true, same elements make up $a and $c $a eqv $c; #true, same elements

Re: === and array-refs

2006-08-17 Thread David Green
On 8/17/06, Darren Duncan wrote: At 11:16 PM -0600 8/16/06, David Green wrote: I just want [1,2] to be === to [1,2], or [1,2, [EMAIL PROTECTED] to be equal to [1,2, [EMAIL PROTECTED] but !=== [1,2, [EMAIL PROTECTED] -- eqv won't work in the latter case (regardless of Seq vs. Array -- I d

Re: Numerification of Order:: constants

2006-08-17 Thread David Green
e go from 3 up to 4. However, what I'm wondering is whether Order::Same is "but true" and the others "but false"? (Which makes cmp in boolean context the same as eqv, but it seems to make sense that way.) -David

Re: === and array-refs

2006-08-17 Thread David Green
On 8/16/06, David Green wrote: $a=[1, 2, [EMAIL PROTECTED]; $c=[1, 2, [EMAIL PROTECTED]; $d=[1, 2, [EMAIL PROTECTED]; $a =:= $c; #false, different variables $a === $c; #true, same elements make up $a and $c $a eqv $c; #true, same elements

META vs meta

2006-09-11 Thread David Brunton
s it broke? Am I missing anything else? Best, David.

Re: META vs meta

2006-09-11 Thread David Green
. In that case, .WHO definitely makes more sense for the name. -David

Re: META vs meta

2006-09-14 Thread David Brunton
Aaron Sherman wrote: >Is the goal to avoid namespace pollution? If so, shouldn't there be a >truly "metaish" way of getting at the internal namespace so that someone >doesn't accidentally render an object unusable by defining the wrong >method name (which you can prevent with an error if the ob

special named assertions

2006-09-27 Thread David Brunton
d assertions are defined? It would make it easier to link the tests, and to tell the difference between examples like and builtins like . Last, but not least, should any of these be crossed off the list? Best, David.

Negative array subscripts

2007-02-05 Thread David Green
at, etc., or whether 0 should be the first element or the last, and so on. (And of course, if arrays can be indexed with {}, then hashes can be indexed with [] -- dunno if there's any point for ordinary hashes, but it certainly could be useful with ordered ones.) -David

Re: Negative array subscripts

2007-02-05 Thread David Green
On 2/5/07, David Green wrote: Then we wouldn't need * to count backwards, although it's still useful to allow us to count past the end of an array. There are all sorts of variations on this scheme, such as whether * is the last element or the one after that, etc., or whether 0 sho

Re: [S09] "Whatever" indices and shaped arrays

2007-02-27 Thread David Green
funny" indices (and the related issues of wrap-around), you can count past the edges, and all while preserving familiar array behaviour (especially for P5 veterans), the meaning of * as "everything", and uncluttered syntax. -David

Re: [S09] "Whatever" indices and shaped arrays

2007-03-05 Thread David Green
On 2/27/07, Jonathan Lang wrote: David Green wrote: So I end up back at one of Larry's older ideas, which basically is: [] for counting, {} for keys. What if you want to mix the two? "I want the third element of row 5". In my proposal, that would be "@array[5, *[2]]

Re: [S09] "Whatever" indices and shaped arrays

2007-03-07 Thread David Green
.Inf if that's what you want, but otherwise how would you get [1..^*] meaning [1,2,3,4]? Perhaps the range could note when it's occurring in []-context, and interpret the * as count rather than as Inf? -David

Whatevereversing Ranges

2007-03-07 Thread David Green
tably for the types involved. -David

Re: [svn:perl6-synopsis] r14317 - doc/trunk/design/syn

2007-03-08 Thread David Green
to carve out your own space in the Foo universe? You should, of course, unless your module also is compatible with module Bar. It can't have two names, but it can advertise itself as being compatible with two or more other modules.) -David

Module versions (was "Re: [svn:perl6-synopsis] r14317 - doc/trunk/design/syn")

2007-03-08 Thread David Green
a known good version. Does "allowed to run anyway" mean because older versions stay installed (and thus you should be able to get an exact match), or does it mean you might get some other module altogether, as long as it claims to be compatible with whatever you asked for? -David

Re: request new Mapping|Hash operators

2007-03-17 Thread David Green
shes, should it be called something else? Or should file-renaming be called something else? Or should both 'rename's be methods only, and not have any "rename" function/multi? [I think that might already be the case, although I can't put my finger on it at the moment.] ... -David

Re: request new Mapping|Hash operators

2007-03-19 Thread David Green
trictly the same as renaming a key. Consider what would happen if the value were a funny object that had side-effects every time you evaluated it. As for the name, I don't think it's a problem for hashes and IOs to both have "rename" methods, but I do like Uri's "rekey" suggestion. -David

Re: Does =$*ARGS work?

2007-04-13 Thread David Vergin
on 4/11/2007 10:29 AM brian d foy said the following: The $*ARGS variable shows up in this file, which looks like it's still maintained: http://svn.pugscode.org/pugs/docs/AES/S28draft.pod That's a typo (mine). It should be @*ARGS and refers to simple access to the command line arguments

Re: Does =$*ARGS work?

2007-04-13 Thread David Vergin
on 4/13/2007 4:55 AM brian d foy said the following: > Shouldn't $*ARGS still show up as the P6 counterpart to ARGV? > S*ARGS as the filehandle shows up in S04. Yup. Fixed now in S28draft.pod. Mention in Variable.pod will follow. dvergin

Re: [svn:perl6-synopsis] r14407 - doc/trunk/design/syn

2007-05-31 Thread David Green
inking of them as Objects with built-in optimiser hints? Not that I have a good example of why you'd want to specify a native-only type; I'm only asking out of pedantic curiosity. -David

Re: propose renaming Hash to Dict

2007-05-31 Thread David Lloyd
I thought one of the things that Larry didn't want to do when moving towards the next big version of Perl was to change the nature of the language such that it wasn't Perl any more. I feel that renaming a Hash to Dict would be one of those changes. Personally, I don't find it difficult to

Re: Referring to source code within Perldoc

2007-06-21 Thread David Green
;t know what's going on around it, but Perl does, and could say, "I've just declared $size, and the next line starts a chunk of POD, so I'll simply copy it into $size's 'documented' trait... would that work??) -David

Re: Referring to source code within Perldoc: the new A<> code

2007-06-21 Thread David Green
umentation is not necessary written in order (I too like to put docs before code), so I don't see why we couldn't have a code for succeeding aliases as well. -David

Re: documentation standards (was "[svn:perl6-synopsis] r14421 - doc/trunk/design/syn")

2007-06-21 Thread David Green
ay, in case I'm sounding too polarised I should acknowledge that I do agree with your underlying points about not overly restricting things. I want rules *and* flexibility, and I believe we can have both, just as Perl itself is very structured (more so than P5), but is at the same time extremely flexible (also more so than P5!). I do agree that docs should have as much freedom as code; I want them to have as much structure too. -David

Re: documentation standards (was "[svn:perl6-synopsis] r14421 - doc/trunk/design/syn")

2007-06-22 Thread David Green
On 6/22/07, Smylers wrote: David Green writes: Well, clutter like "Blah: none" seems to me to be more the fault of the doc-formatter for not hiding lines like that. It's more the repetition in the lines you snipped that I really object to: Ah. (That was sneaky of me.) I

Re: Documenting Perl6 part 2

2007-07-16 Thread David Green
ents regarding your proposal when I have a bit more time myself -David

Re: Micro-articles on Perl 6 Operators

2007-09-19 Thread David Vergin
> On 9/18/07, Paul Hodges <[EMAIL PROTECTED]> wrote: >> >> For the Gearheads >> We won't bore you with excess details, >> but for more info... c.f. ... >> on 9/19/2007 10:19 AM Adriano Ferreira said the following: > I am thinking about such hooks and good ways to do that. As an eager r

Re: Pair notation for number radix

2007-10-07 Thread David Green
ened to the suggestion of using ` to designate units? Bases are a kind of unit (sort of -- counting the number of 10's or 2's or 16's), so if the colon-form is ambiguous, perhaps it could be 20`16==32`10? -David

The Core of the Matter (was "Re: xml and perl 6")

2007-11-29 Thread David Green
re, Perl6 is just a syntax module." Or simply: "Perl6: there is no core." Core-dially, David

Standards bearers (was "Re: xml and perl 6")

2007-11-30 Thread David Green
(Or volunteer to figure out exactly what it is that would need organising) The other side to this problem is coming up with good modules so there's something to recommend. But that is a technical issue and something for a separate post. -David

Re: xml and perl 6

2007-11-30 Thread David Green
print; # prints $_, the current loop variable } Yup (although I think that should be: for =$myxmlvar[etc...]). I will stop here ... so I can put on my flame proof suit. I find nothing to flame here, but lots to discuss. -David

Concurrency

2007-12-06 Thread David Brunton
tware-transactional memory? Hopefully I'm not inadvertently starting any kind of flame-fest about anyone's favorite concurrency model here :-D Best, David. Never miss a thing. Make Yahoo your h

Re: Concurrency

2007-12-06 Thread David Brunton
Inadvertently replied to this off-list... Moritz wrote: >There's no need for any "keyword" to be in STD.pm. STD.pm just defines >the grammar. Syntactically fork will be like just another sub, so it can >safely be handled in the compiler's runtime. > >> * Where will C, C, and possible friends (e.g.

Re: what should be the default extension?

2008-01-07 Thread David Green
red ".pm" is a "suffix" rather than an "extension" (in the Windows sense). I think a primary raison d'etre is so you can have a module "Foo" which is really Foo.pm and a directory "Foo" for sub-modules. But not being allowed to have a file and a dir of the same name is itself merely an unnecessary restriction that just happens to be implemented by some currently-popular filesystems. -David

Re: pluralization idea that keeps bugging me

2008-01-31 Thread David Green
t;$<" instead of "\s": say "I'm bid $d dollar$< for @this[]$> $o @ox[]$<" ...except that I'm not crazy about calling it "$>". (If that would even work.) But something like that. Perhaps strings should build an array of their interpolations? say "$a $b $c, this string contains [EMAIL PROTECTED] interpolations" (Then again, maybe there's a time to break down and use (s)printf.) -David

Re: pluralization idea that keeps bugging me

2008-01-31 Thread David Green
On 2008-Jan-31, at 2:38 am, Mark Overmeer wrote: * David Green ([EMAIL PROTECTED]) [080131 08:48]: I've always wanted a magic-S (and I don't think the anglocentrism matters In "the good old days" all computer OSes were anglo-centric. They are not like that anymore

Re: Musings on operator overloading (was: File-Fu overloading)

2008-02-24 Thread David Green
n you want to make it absolutely explicit: open($dir fs ($filename ~ $total div $count)). (I also expect that files will be treated more consistently in P6, without as many issues about whether a "file" is a string or a handle or an object...) -David

Re: Musings on operator overloading

2008-03-19 Thread David Green
again because "overloading" is natural to human communication. And of course being so flexible about how to balance mapping onto the way humans think vs. mapping onto the problem space is what makes P6 so delightful. Which is why I like it so much more than certain of its brethren with their Orthogonality Ueber Alles attitude. I just don't want to see that sort of prescriptivity creep in to Perl. (Unless it's predeclared, of course!!) -David

Re: Idea: infer types of constants

2008-04-14 Thread David Green
12.34;# my Num $x my * $y = "abc";# my Str $y const * $z = $foobar; # const Foo::Bar $z -David

Re: What does 'eqv' do exactly?

2008-05-03 Thread David Green
for objects will be something like P5's unique memory address. Presumably the snapshot then takes whatever an object claims to be its "value" and reduces any mutable parts into immutable values, until it end up with something that consists wholly of immutable values. -David

Re: nested 'our' subs - senseless?

2008-05-05 Thread David Green
x) { # explicitly create a new multi with every specialization state %didit; unless ++ %didit{ $x.HOW } { my multi sub inner (T $x) { ... } Package::<&inner> = &inner; } } Well, for one thing, "Package::inner" in this example is set at run- time, while "our sub inner" in your first example is declared at compile-time, right? -David

Re: nested 'our' subs - senseless?

2008-05-06 Thread David Green
sub to do Package. I don't understand what a "sub doing Package" is supposed to do. I think you get the same thing from that last example whether foo and bar are classes or whether they're subs: either way, bar will raise a redefinition error, and "say inner.new.x" will throw a "no 'inner' in scope" error. -David

Re: ordinal access to autosorted hashes

2008-06-01 Thread David Green
ash every time it's called, you'd have to replace the innards of the Hash type yourself anyway. But if you did make a Hash::Sorted class, defining an "is sorted" trait might be a nice way to use it. -David

Huffman encoding (was Re: treatment of "isa" and inheritance)

2008-06-01 Thread David Green
code more efficient to write is the job of one's text-editor, not the language. Maybe we should work on auto- completion files for popular editors that will expand things like ":str" into ":strictly", etc.) -David

Re: assignable mutators (S06/Lvalue subroutines)

2008-06-01 Thread David Green
t it for various reasons (and =$x refers to iteration in other contexts). Perhaps it could be identified as "$x is assigned" -- but that doesn't look quite right to me either. However it's written, it would be simpler than having to use proxies. -David

Re: ordinal access to autosorted hashes

2008-06-02 Thread David Green
On 2008-Jun-1, at 11:20 am, Jon Lang wrote: David Green wrote: I thought it already did, but apparently it's something that we discussed that didn't actually make it into S09. I agree that .[] should apply to hashes just as .{} can apply to arrays. The hashes don't ev

Re: assignable mutators (S06/Lvalue subroutines)

2008-06-02 Thread David Green
On 2008-Jun-1, at 1:50 pm, Jon Lang wrote: David Green wrote: [...] assignment should work like passing args when used on a function. Then you can easily do whatever you want with it. [...] If a routine is rw, you may optionally define a single "slurpy scalar" (e.g., '*

Re: Fatal/autodie exception hierarchies for Perl 5

2008-06-04 Thread David Nicol
On Mon, Jun 2, 2008 at 6:50 PM, Larry Wall <[EMAIL PROTECTED]> wrote: >* Exception handlers run in the lexical context of the block being >tried. >* Exception handlers run in the dynamic context of the code that is >failing. the first seems dangerous, esp. considering the

Re: Fatal/autodie exception hierarchies for Perl 5

2008-06-04 Thread David Nicol
On Wed, Jun 4, 2008 at 7:21 AM, Mark J. Reed <[EMAIL PROTECTED]> wrote: > The catch block is lexically contained within the try block, so the > inviolate nature of the curlies remains intact. thank you.

Re: assignable mutators (S06/Lvalue subroutines)

2008-06-06 Thread David Green
nstead of two. Of course, since subs are objects too, maybe all you need for an lvalue-sub is to override the FETCH and STORE methods it already has. But then the "is rw" stuff would simply be syntactic sugar to make doing so prettier. -David

Re: Multiple Return Values - details fleshed out

2008-08-12 Thread David Green
s, and the return statement would need to supply each one twice. Couldn't these all work the same way as parameter passing does? Even at the cost of a bit more complexity, it would be simpler overall to have only one set of rules to learn. -David

Re: Why no "is ro"? (Re: Subroutine parameter with trait and default.)

2008-09-23 Thread David Green
27;s editor; any editor worth its salt ought to easily auto-complete "ro" into "readonly". -David

Re: Split with negative limits, and other weirdnesses

2008-09-23 Thread David Green
rn everything, and take a slice of the result -- assuming it can be lazy enough to calculate only what ends up getting sliced out. -David

Re: Why no "is ro"? (Re: Subroutine parameter with trait and default.)

2008-09-24 Thread David Green
On 2008-Sep-23, at 5:27 pm, Michael G Schwern wrote: David Green wrote: Happily, brevity often aids clarity. The rest of the time, it should be up to one's editor; any editor worth its salt ought to easily auto-complete "ro" into "readonly". Eeep! The "your

Signatures and matching (was "Re: XPath grammars (Was: Re: globs and trees in Perl6)")

2008-10-21 Thread David Green
but not necessary. Being able to use class info that's already there would make it easy to grab params when I know the type of object I'm looking for, but not what it's called. -David

Re: Signatures and matching (was "Re: XPath grammars (Was: Re: globs and trees in Perl6)")

2008-10-25 Thread David Green
On 2008-Oct-22, at 10:03 am, TSa wrote: David Green wrote: One thing I would like signatures to be able to do, though, is assign parameters by type. Much like a rule can look for identifiable objects like a or , it would be very useful to look for parameters by their type or class rather

Re: how to write literals of some Perl 6 types?

2008-12-02 Thread David Green
r (except for symbols that are already established with the required meaning, and the only ones that come to mind are braces to indicate sets -- and of course Perl already uses braces for something else). -David

Re: Support for ensuring invariants from one loop iteration to the next?

2008-12-03 Thread David Green
something on only the first iteration through the loop, but there's no NOT-FIRST block to do something on the second and subsequent iterations. Is there an elegant way to do something on all but the first loop? -David

Re: how to write literals of some Perl 6 types?

2008-12-03 Thread David Green
tch to Int? What happens with non-continuous enums? My vote would be to not generate any operators Since ++ works on strings without making them numbers, I think it should increment from A::One to A::Two. But if that's ambiguous, we could drop the ++ and stick with .=succ for non-numeric objects instead. -David

Re: why infix::(Int, Int --> Rat)

2008-12-04 Thread David Green
ay, e.g. "floor($i/$j)", forces you to be blatantly clear that you're disposing of the remainder and how. -David

Equality of values and types (was Re: how to write literals of some Perl 6 types?)

2008-12-05 Thread David Green
lasses need to indicate their family resemblances somehow. Now, which is more useful? Is it worth having "===" and "syn"? -David

Re: why infix::(Int, Int --> Rat)

2008-12-05 Thread David Green
eturn some other special compound type that numifies to the quotient. -David

Re: Support for ensuring invariants from one loop iteration to the next?

2008-12-05 Thread David Green
ll not up front, but if the first block is really long, you can always... add a comment!) -David

Re: Support for ensuring invariants from one loop iteration to the next?

2008-12-05 Thread David Green
On 2008-Dec-5, at 7:43 am, David Green wrote: Now the condition is in the middle and is syntactically separate. (It's still not up front, but if the first block is really long, you can always... add a comment!) Well, you don't need a comment -- why not allow the condition to co

<    1   2   3   4   5   6   7   8   9   10   >