Re: RFC 127 (v1) Sane resolution to large function returns

2000-09-10 Thread Glenn Linderman
Chaim Frenkel wrote: "GL" == Glenn Linderman [EMAIL PROTECTED] writes: GL Chaim Frenkel wrote: ($foo, $baz, @bar) = (1,(2,3),4) # $foo = 1 $baz=2, @bar=(3,4) Actually, looking at it like that makes it an ugly situation. The 'new' expectation would be to have it become # $foo=1

Re: RFC 127 (v1) Sane resolution to large function returns

2000-09-05 Thread Chaim Frenkel
"GL" == Glenn Linderman [EMAIL PROTECTED] writes: GL Chaim Frenkel wrote: ($foo, $baz, @bar) = (1,(2,3),4) # $foo = 1 $baz=2, @bar=(3,4) Actually, looking at it like that makes it an ugly situation. The 'new' expectation would be to have it become # $foo=1 $baz=2 @bar=(4) GL Actually?

Re: RFC 127 (v1) Sane resolution to large function returns

2000-08-24 Thread Hildo Biersma
Larry Wall wrote: I expect that we'll get more compile-time benefit from my HASH sub foo { ... } %bar = foo(); Ah, the Return Value Optimization so loved in C++... For those who haven't seen it before, you can optimize this by passing in a reference to %bar to

Re: RFC 127 (v1) Sane resolution to large function returns

2000-08-24 Thread Larry Wall
Bart Lateur writes: : On Thu, 24 Aug 2000 09:38:28 +0100, Hildo Biersma wrote: : : I expect that we'll get more compile-time benefit from : : my HASH sub foo { : ... : } : : %bar = foo(); : : Ah, the Return Value Optimization so loved in C++... : : For those who

Re: RFC 127 (v1) Sane resolution to large function returns

2000-08-24 Thread Dan Sugalski
At 08:02 AM 8/24/00 -0700, Larry Wall wrote: Bart Lateur writes: : On Thu, 24 Aug 2000 09:38:28 +0100, Hildo Biersma wrote: : : I expect that we'll get more compile-time benefit from : : my HASH sub foo { : ... : } : : %bar = foo(); : : Ah, the Return Value

Re: RFC 127 (v1) Sane resolution to large function returns

2000-08-24 Thread Larry Wall
Dan Sugalski writes: : Chicanery's on the big To Do list. I'm really wanting to defer list : flattening as long as possible, and skipping it all together. And I'm wondering whether it's better in general to explicitly force a context in which we treat @foo and %bar as objects, rather than

Re: RFC 127 (v1) Sane resolution to large function returns

2000-08-24 Thread Dan Sugalski
At 02:25 PM 8/24/00 -0400, Chaim Frenkel wrote: But ($foo, $baz, @bar) = (1,(2,3),4) # $foo = 1 $baz=2, @bar=(3,4) Actually, looking at it like that makes it an ugly situation. The 'new' expectation would be to have it become # $foo=1 $baz=2 @bar=(4) Wouldn't

Re: RFC 127 (v1) Sane resolution to large function returns

2000-08-24 Thread Glenn Linderman
Chaim Frenkel wrote: ($foo, $baz, @bar) = (1,(2,3),4) # $foo = 1 $baz=2, @bar=(3,4) Actually, looking at it like that makes it an ugly situation. The 'new' expectation would be to have it become # $foo=1 $baz=2 @bar=(4) Actually? How about it becoming

Re: RFC 127 (v1) Sane resolution to large function returns

2000-08-24 Thread Chaim Frenkel
"LW" == Larry Wall [EMAIL PROTECTED] writes: LW Dan Sugalski writes: LW : And do we want to consider making this (and its ilk) Do The Right Thing? LW : LW :(@foo, @bar) = (@bar, @foo); LW We certainly want to consider it, though perhaps not in -internals. LW You can talk about passing

Re: RFC 127 (v1) Sane resolution to large function returns

2000-08-24 Thread Chaim Frenkel
"DS" == Dan Sugalski [EMAIL PROTECTED] writes: DS At 02:25 PM 8/24/00 -0400, Chaim Frenkel wrote: But ($foo, $baz, @bar) = (1,(2,3),4) # $foo = 1 $baz=2, @bar=(3,4) Actually, looking at it like that makes it an ugly situation. The 'new' expectation would be to have it become # $foo=1

Re: RFC 127 (v1) Sane resolution to large function returns

2000-08-23 Thread GregLondon
Buddha Buck [EMAIL PROTECTED] wrote: = =At 11:26 AM 8/23/00 -0700, Larry Wall wrote: = =I expect that we'll get more compile-time benefit from = = my HASH sub foo { = ... = } = = %bar = foo(); = =So how would you fill in the type in: = =my TYPE sub foo { = ... = if

Re: RFC 127 (v1) Sane resolution to large function returns

2000-08-23 Thread Larry Wall
Dan Sugalski writes: : The core will already know. Especially if we add return types. : Whether this justifies exposing the information's for someone else to : judge, but the core will know what context something is in. This is for : optimization reasons. While it's straightforward enough to

Re: RFC 127 (v1) Sane resolution to large function returns

2000-08-23 Thread Buddha Buck
At 11:26 AM 8/23/00 -0700, Larry Wall wrote: I expect that we'll get more compile-time benefit from my HASH sub foo { ... } %bar = foo(); So how would you fill in the type in: my TYPE sub foo { ... if (wanthash()) { return %bar; } if (wantarray()) {

Re: RFC 127 (v1) Sane resolution to large function returns

2000-08-23 Thread Larry Wall
Buddha Buck writes: : At 11:26 AM 8/23/00 -0700, Larry Wall wrote: : : I expect that we'll get more compile-time benefit from : : my HASH sub foo { : ... : } : : %bar = foo(); : : So how would you fill in the type in: : : my TYPE sub foo { :... :if

Re: RFC 127 (v1) Sane resolution to large function returns

2000-08-23 Thread Dan Sugalski
At 12:17 PM 8/18/00 -0600, Nathan Torkington wrote: Perl6 RFC Librarian writes: There has been a proposed new core function Cwant(). this seems to be generally regarded as a good thing. Fine. If it is implemented we should use it. Offending functions (See RFC 37) should use Cwant()

Re: RFC 127 (v1) Sane resolution to large function returns

2000-08-18 Thread Nathan Torkington
Perl6 RFC Librarian writes: There has been a proposed new core function Cwant(). this seems to be generally regarded as a good thing. Fine. If it is implemented we should use it. Offending functions (See RFC 37) should use Cwant() internally to determine what to return i.e; a list or a hash.

RFC 127 (v1) Sane resolution to large function returns

2000-08-17 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Sane resolution to large function returns =head1 VERSION Maintainer: Jerrad Pierce [EMAIL PROTECTED] Date: 17 Aug 2000 Version: 1 Mailing List: [EMAIL PROTECTED] Number: 127 =head1 ABSTRACT

Re: RFC 127 (v1) Sane resolution to large function returns

2000-08-17 Thread Nathan Wiger
As for single datum access, Iperhaps Cfunction-[index] or Cfunction()-{key} should be considered. This however, is not the core of this proposal. Merely a possibility. Just as extending the inelegant metaphor above to C{function()}-{key} would become a possibility. Personally, I think lists