Re: some misc Perl 6 questions

2005-03-10 Thread Thomas Sandlaß
Larry Wall wrote: That's...sick... I love it. *Please* don't tell Damian. whisper Well there are some people who consider it quite sane :) http://www.cduce.org/papers/icalp04.pdf Abstract: This paper studies the problem of matching sequences against regular expressions in order to produce

Re: some misc Perl 6 questions

2005-03-09 Thread Brent 'Dax' Royal-Gordon
Darren Duncan [EMAIL PROTECTED] wrote: A question: Would has PkgNameArray @.tmpl_set_nms; do what I expect, where the array as a whole is the sub-type, or would it make an array where each element is the sub-type? I think this declares an array of PkgNameArrays, but has @.tmpl_set_nms is

Re: some misc Perl 6 questions

2005-03-09 Thread David Storrs
On Tue, Mar 08, 2005 at 10:29:30PM -0800, Darren Duncan wrote: [...] By using subtypes in this way, I could remove a lot of explicit input checking code from my methods, which is great. Also, the where clause is not being repeated for every argument or attribute or variable declaration.

Re: some misc Perl 6 questions

2005-03-09 Thread Larry Wall
On Tue, Mar 08, 2005 at 10:29:30PM -0800, Darren Duncan wrote: : The biggest change is that, upon a re-reading Synopsis 12 (and 9) : that was inspired by your above comment, I created some subtypes : which I now use everywhere; the declarations and some examples of use : are: : : subtype

Re: some misc Perl 6 questions

2005-03-09 Thread Thomas Sandlaß
Larry Wall wrote: and it seems to me that you could simplify all that to just subtype KeyName of Str where { m/^\w+$/ } If that succeeds, you know it's defined and non-null. My view is that typing strings by means of patterns should always exhaust the string as the above pattern does. I can

Re: some misc Perl 6 questions

2005-03-09 Thread Larry Wall
On Wed, Mar 09, 2005 at 06:51:43PM +0100, Thomas Sandlaß wrote: : Larry Wall wrote: : and it seems to me that you could simplify all that to just : : subtype KeyName of Str where { m/^\w+$/ } : : If that succeeds, you know it's defined and non-null. : : My view is that typing strings by

Re: some misc Perl 6 questions

2005-03-09 Thread Darren Duncan
At 10:03 AM -0800 3/9/05, Larry Wall wrote: On Wed, Mar 09, 2005 at 06:51:43PM +0100, Thomas Sandlaß wrote: : Larry Wall wrote: : and it seems to me that you could simplify all that to just : : subtype KeyName of Str where { m/^\w+$/ } : : If that succeeds, you know it's defined and

using Rules with undefined values (was Re: some misc Perl 6 questions)

2005-03-09 Thread Darren Duncan
At 9:08 AM -0800 3/9/05, Larry Wall wrote: My other quibble is that you seem to be prone to stating things in the negative for at least two of your three tests here: subtype KeyName of Str where { $_.defined and $_ ne '' and $_ !~ m/\W/ } and it seems to me that you could simplify all that to

some misc Perl 6 questions

2005-03-08 Thread Darren Duncan
Greetings, I have just started to write a large amount of Perl 6 code, partly to help with testing the Pugs (and later Parrot) implementation of the language. During this process, I discovered a few details about Perl 6 that I don't yet understand, and haven't yet been able to get answers to

Re: some misc Perl 6 questions

2005-03-08 Thread Larry Wall
On Tue, Mar 08, 2005 at 03:50:41PM -0800, Darren Duncan wrote: : Greetings, : : I have just started to write a large amount of Perl 6 code, partly to : help with testing the Pugs (and later Parrot) implementation of the : language. During this process, I discovered a few details about Perl :

Re: some misc Perl 6 questions

2005-03-08 Thread Darren Duncan
Thanks for your feedback Larry; much appreciated it is. A few more interesting things happened since then, which can be seen in the current version of Locale::KeyedText in the Pugs version control. At 5:35 PM -0800 3/8/05, Larry Wall wrote: : 8. Is it possible with a sub or method argument