filling a role different ways

2005-11-18 Thread Christopher D. Malon
I'd like to see a way to map methods and variables expected by a role, onto methods and variables provided by a class. I'd like it to be possible for a class to provide several such maps, having the appropriate one selected according to context. Continuing an example from an earlier thread

Re: ='s autoquoted identifiers

2005-11-18 Thread TSa
HaloO, Luke Palmer wrote: I think = gets special treatment from the parser; i.e. it is undeclarable. It's probably not even declarable as a macro, since it needs to look behind itself for what to quote. And I think this is okay. For some reason, we are not satisfied if if is undeclarable,

Re: ='s autoquoted identifiers

2005-11-18 Thread Larry Wall
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,

Re: ='s autoquoted identifiers

2005-11-18 Thread Larry Wall
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

Classification syntax [Was: Renaming grep]

2005-11-18 Thread Larry Wall
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', :

Re: Classification syntax [Was: Renaming grep]

2005-11-18 Thread Juerd
Larry Wall skribis 2005-11-18 11:36 (-0800): In Perl 5, to set a slice, you have to write %hash{ @keys } = @values; @... :) whereas in Perl 6, it'd be nice to be able to say that with all the keys and values on the right side somehow. Shouldn't a simple %hash = @keys Y @values;

Re: Test Case: Complex Numbers

2005-11-18 Thread Flavio S. Glock
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, are lazy hash slices allowed? %h{1...} I asked this in #perl6 when I was

Re: Test Case: Complex Numbers

2005-11-18 Thread Larry Wall
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, are

Re: Classification syntax [Was: Renaming grep]

2005-11-18 Thread Flavio S. Glock
Larry Wall wrote: If we had some kind of partitioning operator, it'd probably be generalized to sorting into bins by number, where 0 and 1 are degenerate cases for booleans. Cool! This doesn't solve the general case, but how about a left-side zip: zip( @keys, @values ) = %hash; zip(

Re: Test Case: Complex Numbers

2005-11-18 Thread Larry Wall
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

Re: Classification syntax [Was: Renaming grep]

2005-11-18 Thread Brent 'Dax' Royal-Gordon
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 without declaring temp arrays. Didn't the list agree long ago on a `part` builtin? I

Re: Classification syntax [Was: Renaming grep]

2005-11-18 Thread Flavio S. Glock
2005/11/18, Brent 'Dax' Royal-Gordon [EMAIL PROTECTED]: 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 without declaring temp

Re: Classification syntax [Was: Renaming grep]

2005-11-18 Thread Larry Wall
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

Re: Fwd: Renaming grep

2005-11-18 Thread Ilmari Vacklin
On to, 2005-11-17 at 22:44 -0500, David Storrs wrote: 'sift' is the same number of characters as 'grep'. It's something of a bikeshed to me whether this rename is implemented or not, though. I don't much like it - it looks like a mistyped 'shift'. Is 'filter' too long? -- wolverian [EMAIL

Re: Fwd: Renaming grep

2005-11-18 Thread Chip Salzenberg
On Sat, Nov 19, 2005 at 05:46:51AM +0200, Ilmari Vacklin wrote: I don't much like it - it looks like a mistyped 'shift'. Is 'filter' too long? I usually avoid P6L discussions, but: GNU Make has filter and filter-out, and I've always found the polarity hard to remember. I like grep. -- Chip