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

2006-09-30 Thread audreyt
Author: audreyt Date: Sat Sep 30 20:16:38 2006 New Revision: 12533 Modified: doc/trunk/design/syn/S02.pod doc/trunk/design/syn/S09.pod Log: * S02: Re-introduce comprehension, this time not context-specific, under the list() syntactic expression: # list() comprehension that evalu

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

2006-09-30 Thread audreyt
Author: audreyt Date: Sat Sep 30 20:13:47 2006 New Revision: 12531 Modified: doc/trunk/design/syn/S09.pod Log: * S09: any() no longer has anything to do with comprehension. Modified: doc/trunk/design/syn/S09.pod == --

Re: Automatic coercion and context

2006-09-30 Thread Bob Rogers
From: Jonathan Scott Duff <[EMAIL PROTECTED]> Date: Sat, 30 Sep 2006 17:23:54 -0500 On Sat, Sep 30, 2006 at 11:48:04AM -0700, Joshua Choi wrote: > How does automatic coercion work? [ deletia ] > 1. C automatically coerces its C arguments into C > parameters because C. Wouldn

Re: Automatic coercion and context

2006-09-30 Thread Jonathan Scott Duff
On Sat, Sep 30, 2006 at 11:48:04AM -0700, Joshua Choi wrote: > How does automatic coercion work? [ deletia ] > 1. C automatically coerces its C arguments into C > parameters because C. > 2. C then automatically coerces its C arguments into > C parameters because C. > > ...Or am I completely off t

Re: Automatic coercion and context

2006-09-30 Thread Jonathan Lang
My understanding is that "does" will prevent coercion. In particular, it is erroneous to say that 'Str does Num' or that 'Num does Str'. If you say 'Foo does Bar', what this means is that anything Bar can do, Foo can do, too. As such, any routine that asks for a Bar can just as easily be given

Automatic coercion and context

2006-09-30 Thread Joshua Choi
Kudos to all(@Larry)! How does automatic coercion work? Like, when a routine wants a parameter of a certain type, and is called with an argument of a different type that C (For instance, is it something a little like this? multi sum ( Num $addend1, Num $addend2 --> Num ) { ... } multi say ( S