Re: Do I need has $.foo; for accessor-only virtual attributes?

2005-07-22 Thread Brent 'Dax' Royal-Gordon
Larry Wall [EMAIL PROTECTED] wrote: $x is visible only in the rest of the lexical scope. In contrast, $_y would presumably still be visible if the class were reopened. This strikes me as an exceedingly bad idea. Encapsulation is a very good thing, and I'm glad it's being added to Perl 6. But

Re: Do I need has $.foo; for accessor-only virtual attributes?

2005-07-22 Thread Stevan Little
Larry, On Jul 21, 2005, at 8:07 PM, Larry Wall wrote: On Thu, Jul 21, 2005 at 05:15:34PM -0400, Stevan Little wrote: : This means that Roles are now first-class-ish things. Meaning they : cannot just simply be composed into classes since now we have to keep a : table of elements which are

Re: Do I need has $.foo; for accessor-only virtual attributes?

2005-07-22 Thread Collin Winter
I'm not married to the colon. Speaking of traits and adverbs, why not use one of those in the has declaration instead? That'd certainly be a lot more explicit than the magic leading underscore (although I'm at a loss as to what the trait would be named...) I'd like to see an is private

Re: Tail method calls, can(), and pre-currying

2005-07-22 Thread Brent 'Dax' Royal-Gordon
On 21/07/05, Adriano Ferreira [EMAIL PROTECTED] wrote: But is there any other case where we need an explicit tail call with goto? When the callee uses `caller -- Brent 'Dax' Royal-Gordon [EMAIL PROTECTED] Perl and Parrot hacker

Re: Do I need has $.foo; for accessor-only virtual attributes?

2005-07-22 Thread Stevan Little
Brent, On Jul 22, 2005, at 3:53 AM, Brent 'Dax' Royal-Gordon wrote: (If not this, I at least would like to see a way to make roles and/or class extensions optionally merge their namespace with the class they're being composed into; a simple 'is merged' on the role/extension's definition might

Re: Tail method calls, can(), and pre-currying

2005-07-22 Thread Larry Wall
On Fri, Jul 22, 2005 at 07:04:24AM -0700, Brent 'Dax' Royal-Gordon wrote: : On 21/07/05, Adriano Ferreira [EMAIL PROTECTED] wrote: : But is there any other case where we need an explicit tail call with goto? : : When the callee uses `caller Which we may not know, especially if we're

Re: Do I need has $.foo; for accessor-only virtual attributes?

2005-07-22 Thread Larry Wall
On Fri, Jul 22, 2005 at 07:35:30AM -0500, Collin Winter wrote: : I'm not married to the colon. Speaking of traits and adverbs, why not use : one of those in the has declaration instead? That'd certainly be a lot : more explicit than the magic leading underscore (although I'm at a loss as :

Re: Do I need has $.foo; for accessor-only virtual attributes?

2005-07-22 Thread John Siracusa
Third time's the charm...really. Please ignore the last two messages from me in favor of this one please. Sigh**2. --- On 7/22/05 11:37 AM, Larry Wall wrote: The problem I have with is private is that, while there may very well be a trait of that name that you can interrogate, I really want

Re: Do I need has $.foo; for accessor-only virtual attributes?

2005-07-22 Thread TSa (Thomas Sandlaß)
Larry Wall wrote: The problem I have with is private is that, while there may very well be a trait of that name that you can interrogate, I really want people to think of the private methods as being in a different namespace so that there's no confusion about the fact that you can have a private

Re: Do I need has $.foo; for accessor-only virtual attributes?

2005-07-22 Thread TSa (Thomas Sandlaß)
Larry Wall wrote: $x is visible only in the rest of the lexical scope. In contrast, $_y would presumably still be visible if the class were reopened. Which brings me to the question how the name information is told to a prospective user if the source code of the the first definition shall not

Re: DBI v2 - Data In and Data Out

2005-07-22 Thread Raphael Wegmann
John Williams schrieb: The proposals so far have dealt mostly with the SQL itself, and supporting database-neutral layers on top of DBI. Personally, I don't mind writing the SQL myself, I rarely need to make a particular statement work on two databases in my work, and I can optimize a lot

Re: Strange interaction between pairs and named binding

2005-07-22 Thread Damian Conway
Larry wrote: : If the Bare code object (including pointy and non-pointy) default their : parameter types to Any (that is, Item|Pair|Junction), then all of : these would work: : : for [1..10].pairs { say(.value) } : for [1..10].pairs { say($^x.value) } : for [1..10].pairs - $x {