Re: Topification [Was: Arglist I/O [Was: Angle quotes and pointy brackets]]

2004-12-07 Thread Matthew Walton
Austin Hastings wrote: I'll guess that you're pointing at .:send_one($_); Which supposedly uses "topic" to resolve .:send_one into $this.send_one. If that works, then I'm happy -- I like being able to control topic and $_ differently. But if C changes topic, then what? OUTER::.:send_one($_); Yu

Re: iterators and functions (and lists)

2004-12-07 Thread Matthew Walton
Larry Wall wrote: On Sun, Dec 05, 2004 at 12:05:46AM +, Matthew Walton wrote: : I'm sorry, but from a C++ background, overriding postcircumfix:<( )> : feels far more natural to me than setting 'is default' on some method. That only works for disambiguation if you know which .() to call in th

Re: specifying the key Type for a Hash

2004-12-07 Thread Brent 'Dax' Royal-Gordon
Larry Wall <[EMAIL PROTECTED]> wrote: > Also says maybe you could attach a block to a hash or array to > define what subscripting does. Hmm. That's...wow. class Patient { my DBI::Connection $db; my Patient @byid[Int $id] { select_patients("SELECT * FROM patients WHERE patientid

Re: specifying the key Type for a Hash

2004-12-07 Thread David Green
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Luke Palmer) wrote: >David Green writes: > > In article <[EMAIL PROTECTED]>, > > [EMAIL PROTECTED] (Larry Wall) wrote: > > >Maybe type parameters are just subscripts? [...] > > >my Fight %fight does key{Dog;Cat}; > > I like that. > >Yeah, me

Pleasing some of the people all of the time

2004-12-07 Thread David Green
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Larry Wall) wrote: >On Mon, Dec 06, 2004 at 03:11:15AM -0700, David Green wrote: >[snip] >: I like that. >: I like that even better. [etc.] >Um. You're so very...easy to please... I guess I'm okay with that... =) But you'll notice we didn't hi

Re: specifying the key Type for a Hash

2004-12-07 Thread Matt Diephouse
On Tue, 7 Dec 2004 00:39:08 -0800, Brent 'Dax' Royal-Gordon <[EMAIL PROTECTED]> wrote: > Larry Wall <[EMAIL PROTECTED]> wrote: > > Also says maybe you could attach a block to a hash or array to > > define what subscripting does. Hmm. > > That's...wow. > > class Patient { > my DBI::Connection

Is object representation "per class" or "per object"?

2004-12-07 Thread Abhijit Mahabal
According to S12, it is possible to supply the object layout to bless(), like so: $object = $class.bless(:CREATE[:repr] :k1($v1) :k2($v2)) But in the section "Introspection", "layout" is a class trait. Does this mean that classes have a default layout that can be overriden for individual object

S05 question

2004-12-07 Thread Patrick R. Michaud
I'm reviewing the updated S05 (2 Dec 2004) and ran across this in the "Hypothetical Variables" section: # Pairs of repeated captures can be bound to hashes: / % := [ () = (\N+) ]* / Actually, I see three captures there, so should this instead read...? / % := [ («ident») = (\

Re: pull & put (Was: Angle quotes and pointy brackets)

2004-12-07 Thread Alexey Trofimenko
On Mon, 06 Dec 2004 12:22:22 GMT, Smylers <[EMAIL PROTECTED]> wrote: David Green writes: I guess we could always use prepend/append, pull/pop. No! C and C are a well-defined pair, not just in Perl, for dealing with stacks; we should keep those as they are. (And no synonyms, before somebody sugges

Lexical scope of parametric declaration blocks

2004-12-07 Thread Ashley Winters
In S12, I see examples like: role Pet[Type $petfood = TableScraps] { method feed (::($petfood) $food) {...} } I assume that means lexicals declared as part of a parametric specialization declaration block thingy are only visible within that scope, like a formal subroutine parameter list?

Re: Perl 6 Summary for 2004-11-29 through 2004-12-06

2004-12-07 Thread David Wheeler
On Dec 6, 2004, at 6:27 PM, Matt Fowles wrote: getters and setters John Siracusa wanted to know if Perl 6 would allow one to expose a member variable to the outside world, but then later intercept assignments to it without actually having to switch to using getters and setters i

Re: specifying the key Type for a Hash

2004-12-07 Thread Brent 'Dax' Royal-Gordon
Matt Diephouse <[EMAIL PROTECTED]> wrote: > On Tue, 7 Dec 2004 00:39:08 -0800, Brent 'Dax' Royal-Gordon > > my Patient @byid[Int $id] { > > select_patients("SELECT * FROM patients WHERE patientid = ?", > > $id)[0]; > > } > > multi my Patient %byname{String $last} { > >

Re: Lexical scope of parametric declaration blocks

2004-12-07 Thread Luke Palmer
Ashley Winters writes: > In S12, I see examples like: > > role Pet[Type $petfood = TableScraps] { > method feed (::($petfood) $food) {...} > } > > I assume that means lexicals declared as part of a parametric > specialization declaration block thingy are only visible within that > scope,

Re: S05 question

2004-12-07 Thread Larry Wall
On Tue, Dec 07, 2004 at 12:11:18PM -0700, Patrick R. Michaud wrote: : I'm reviewing the updated S05 (2 Dec 2004) and ran across this : in the "Hypothetical Variables" section: : : # Pairs of repeated captures can be bound to hashes: : : / % := [ () = (\N+) ]* / : : Actually, I see th