Re: reduce metaoperator

2005-05-07 Thread Stuart Cook
On 5/7/05, Patrick R. Michaud [EMAIL PROTECTED] wrote: It might not be a problem -- I'm thinking we may end up tokenizing most or all of the meta operators, so that [+] would be considered its own token, and then the longest matching token rule would be sufficient to disambiguate the terms:

Re: available operator characters

2005-05-07 Thread Matt Creenan
On Sat, 07 May 2005 01:47:08 -0400, Matt Creenan [EMAIL PROTECTED] wrote: So here's some random ideas that probably make no sense ($ can be optional.. don't know) *snip* That brings me to another idea. Is $_ as an array used? @_? This relates back to the discussion on topics. Could be use @_

Re: available operator characters

2005-05-07 Thread Juerd
Mark A. Biggar skribis 2005-05-06 22:12 (-0700): Actually if we define |...| at all, I'd prefer it mean abs(), its usual mathmatical meaning. No. We can't just use circumfix |...| with arbitrary expressions in it, because | is taken as an infix operator. It has to be quoteish (like (this is

Re: available operator characters

2005-05-07 Thread Juerd
Matt Creenan skribis 2005-05-07 1:47 (-0400): I thought about $blockname = { ... }, but = is obviously taken, as is == $blockname =: for 1..5 { $blockname := for 1..5 { } $blockname; } =: $blockname; } $blockname; $blockname for 1..5 { $blockname

Re: available operator characters

2005-05-07 Thread Juerd
Matt Creenan skribis 2005-05-07 4:14 (-0400): That brings me to another idea. Is $_ as an array used? @_? The default signature of subs is ([EMAIL PROTECTED]). Juerd -- http://convolution.nl/maak_juerd_blij.html http://convolution.nl/make_juerd_happy.html

Clarification of behavior for .isa() on built-in types

2005-05-07 Thread Stevan Little
Hello All, So I am expanding our .isa() tests for built-in datatypes (in particular Array), and I have a few (probably very simple) questions (since I cannot seem to find details on this anywhere). Is there an isa() built-in for this? Or it is really @array.meta.isa() (from the Introspection

Re: Clarification of behavior for .isa() on built-in types

2005-05-07 Thread Matt Fowles
Stevan~ On 5/7/05, Stevan Little [EMAIL PROTECTED] wrote: But can it also be a Junction? : $fido.isa(Dog | Cat)# true if $fido.isa(Dog) or $fido.isa(Cat) $fido.isa(Dog Beagle) # true if $fide.isa(Dog) and $fido.isa(Beagle) If it can be a Junction, it makes me wonder if

Re: available operator characters

2005-05-07 Thread Luke Palmer
On 5/6/05, Larry Wall [EMAIL PROTECTED] wrote: The question is whether to treat the left arg the same way we treat attribute defaults, with one free closure call. We could say that { rand 10 } x 100 { rand 10 } xx 100 should just automatically call the closure on the left

Re: reduce metaoperator

2005-05-07 Thread Larry Wall
On Sat, May 07, 2005 at 05:11:19PM +1000, Stuart Cook wrote: : On 5/7/05, Patrick R. Michaud [EMAIL PROTECTED] wrote: : It might not be a problem -- I'm thinking we may end up tokenizing : most or all of the meta operators, so that [+] would be considered : its own token, and then the longest

Re: reduce metaoperator

2005-05-07 Thread Larry Wall
On Sat, May 07, 2005 at 01:00:08PM -0700, Larry Wall wrote: : On the other hand, since we've distinguished hyperops on infixes from : hyperops on unaries, maybe an infix hyperop in unary position just : does the thing to itself: : : @squares = »*« @list; : : which gives us a sum-of-squares

Re: available operator characters

2005-05-07 Thread Larry Wall
On Sat, May 07, 2005 at 02:23:15PM +0200, Juerd wrote: : Matt Creenan skribis 2005-05-07 1:47 (-0400): : I thought about $blockname = { ... }, but = is obviously taken, as is == : $blockname =: for 1..5 { : $blockname := for 1..5 { : } $blockname; : } =: $blockname; : }

Re: Clarification of behavior for .isa() on built-in types

2005-05-07 Thread Larry Wall
On Sat, May 07, 2005 at 01:09:52PM -0400, Stevan Little wrote: : Hello All, : : So I am expanding our .isa() tests for built-in datatypes (in : particular Array), and I have a few (probably very simple) questions : (since I cannot seem to find details on this anywhere). : : Is there an isa()

Overriding/redefining p6 built-in functions

2005-05-07 Thread Andrew Savige
A crude hack sometimes used by gung ho p5 testers is to redefine perl built-in functions. For example: BEGIN { *CORE::GLOBAL::read = sub (*\$$;$) { return undef }; } to test read failures (and so boost your Devel::Cover score :-). This technique is not very convenient (must be in a BEGIN