Re: as if [Was: Selective reuse of storage in bless.]

2006-01-26 Thread Stevan Little
On 1/25/06, Jonathan Lang [EMAIL PROTECTED] wrote: Larry Wall wrote: But my hunch is that it's a deep tagmemic/metaphorical problem we're trying to solve here. Such issues arise whenever you start making statements of the form I want to use an A as if it were a B. The problem is much

Re: as if [Was: Selective reuse of storage in bless.]

2006-01-26 Thread Rob Kinyon
On 1/26/06, Stevan Little [EMAIL PROTECTED] wrote: Actually this might not be a bad approach in this case. Take this for instance: method foo (Foo $self, $key) { ((Hash) $self){$key} } The syntax is ugly, but it makes what you are doing more explicit. I would also think that in most

Re: as if [Was: Selective reuse of storage in bless.]

2006-01-26 Thread Stevan Little
On 1/26/06, Rob Kinyon [EMAIL PROTECTED] wrote: On 1/26/06, Stevan Little [EMAIL PROTECTED] wrote: Actually this might not be a bad approach in this case. Take this for instance: method foo (Foo $self, $key) { ((Hash) $self){$key} } The syntax is ugly, but it makes what you

Re: as if [Was: Selective reuse of storage in bless.]

2006-01-26 Thread Rob Kinyon
On 1/26/06, Stevan Little [EMAIL PROTECTED] wrote: If there is need to treat something as a Hash, then provide it with a postcircumfix{} and leave it at that. It's highly unlikely that you will want to add Hash-like behavior to something that already has a postcircumfix{} because it

Re: as if [Was: Selective reuse of storage in bless.]

2006-01-26 Thread Stevan Little
On 1/26/06, Rob Kinyon [EMAIL PROTECTED] wrote: On 1/26/06, Stevan Little [EMAIL PROTECTED] wrote: If there is need to treat something as a Hash, then provide it with a postcircumfix{} and leave it at that. It's highly unlikely that you will want to add Hash-like behavior to something

Re: as if [Was: Selective reuse of storage in bless.]

2006-01-25 Thread Jonathan Lang
Larry Wall wrote: But my hunch is that it's a deep tagmemic/metaphorical problem we're trying to solve here. Such issues arise whenever you start making statements of the form I want to use an A as if it were a B. The problem is much bigger than just how do I translate Perl 5 to Perl 6.

[OT] Re: Parrot and PGE will save the day (was Re: as if [Was: Selective reuse of storage in bless.] )

2006-01-21 Thread Juerd
Rob Kinyon skribis 2006-01-20 23:12 (-0500): $ perl -le '$h{1} = Perl; print values h' Perl $ perl -le 'push a, Perl; print @a' Perl Now, that's an unadvertised feature! I think I need to revisit some golfs ... Not worth the effort, because length('[EMAIL PROTECTED]') == length('push

Re: Parrot and PGE will save the day (was Re: as if [Was: Selective reuse of storage in bless.] )

2006-01-21 Thread Audrey Tang (autrijus)
On 1/21/06, Rob Kinyon [EMAIL PROTECTED] wrote: I'm making a few assumptions here: 1) Since PGE isn't part of Perl6 (because it's written in PIR), it can be used as the parser/lexer/etc. for any language, not just Perl6. Rules, like regexes, are essentially language neutral. So that's

Re: Parrot and PGE will save the day (was Re: as if [Was: Selective reuse of storage in bless.] )

2006-01-21 Thread Larry Wall
On Sat, Jan 21, 2006 at 04:35:00PM +0800, Audrey Tang (autrijus) wrote: : Moreover, writing a Perl 5 parser in PGE alone is... Very difficult. : It can be done (eg. PPI), but taking it and emit PIR is a nontrivial : task that would not magically happen. Actually, PPI is not a good example of

Re: Parrot and PGE will save the day (was Re: as if [Was: Selective reuse of storage in bless.] )

2006-01-21 Thread Larry Wall
The purpose of the P5-to-P6 translator is mostly to provide warm fuzzies. That's how it worked out for a2p, anyway. People knew they had the translator available, but mostly just translated their stuff piecemeal by hand. They primarily used the translator for educational purposes--feed a bit of

as if [Was: Selective reuse of storage in bless.]

2006-01-20 Thread Larry Wall
On Fri, Jan 20, 2006 at 09:35:13PM +0800, Audrey Tang wrote: : Note that A12 used to say that all Objects does Hash, and %$obj even : returns private attributes when used inside the class scope. : Fortunately, S12 doesn't mention anything like that, so I think the : treatment above is safe. We

Re: as if [Was: Selective reuse of storage in bless.]

2006-01-20 Thread Rob Kinyon
On 1/20/06, Larry Wall [EMAIL PROTECTED] wrote: [snip really cool blathering] I don't have much to say on the deeper question, but I have a few ideas on the P5 - P6 translation question, especially as it relates to OO: 1) Don't translate at all. Ponie, delegating to Parrot, is supposed to

Re: as if [Was: Selective reuse of storage in bless.]

2006-01-20 Thread Jeff Stampes
I have to wonder how many other people just edited /usr/share/games/fortune/perl and added: % Humans are not much into strong compile-time typing, and when they are, we call it stereotyping, or racism, or whatever. -- Larry Wall in [EMAIL PROTECTED] And now back to your regularly

Re: as if [Was: Selective reuse of storage in bless.]

2006-01-20 Thread Nicholas Clark
On Fri, Jan 20, 2006 at 04:20:54PM -0500, Rob Kinyon wrote: Pros: Larry doesn't have to do anything more on the WMoT. Cons: The community, for some reason, really wants this auto-translator, even though there wasn't one for P4-P5 and P5-P6 is a greater leap than P4-P5 was. But (as I

Re: as if [Was: Selective reuse of storage in bless.]

2006-01-20 Thread Audrey Tang (autrijus)
On 1/21/06, Larry Wall [EMAIL PROTECTED] wrote: But maybe all this is already possible in the current setup, if role ObjectFakeHash does Hash {...} role Object does ObjectFakeHash {...} class Hash does Hash {...} Yes, I think that's the way to go, as well as :coerceas for

Re: as if [Was: Selective reuse of storage in bless.]

2006-01-20 Thread Stevan Little
Larry Wall wrote: On Fri, Jan 20, 2006 at 09:35:13PM +0800, Audrey Tang wrote: My original intent was #2, hence the wording in A12. But to speak to some of Stevan's concernes, there's something going on here which is not quite Object does Hash. It's more like Object can do Hash, in the

Parrot and PGE will save the day (was Re: as if [Was: Selective reuse of storage in bless.] )

2006-01-20 Thread Rob Kinyon
On 1/20/06, Nicholas Clark [EMAIL PROTECTED] wrote: On Fri, Jan 20, 2006 at 04:20:54PM -0500, Rob Kinyon wrote: Pros: Larry doesn't have to do anything more on the WMoT. Cons: The community, for some reason, really wants this auto-translator, even though there wasn't one for P4-P5