David L. Nicol wrote:
"Randal L. Schwartz" wrote:
I think we need a distinction between "looping" blocks and
"non-looping" blocks. And further, it still makes sense to
distinguish "blocks that return values" (like subroutines
and map/grep blocks) from either of those. But I'll need
Garrett Goebel wrote:
Could someone shoot down or prop up the following:
* Subroutines automatically get their name as a label
Ick! Shades of Pascal! Why don't we just replace "return $value"
with "subroutine_name = $value;"!
Seriously, what is the point of
sub func1
{
Eric Roode wrote:
sub func1
{
func2();
}
sub func2
{
last func1;
}
? Imho, it is a BAD THING for functions to know who called them,
and to vary their behavior accordingly.
Yes. This is a serious downside to the proposal, even
Garrett Goebel wrote:
* Subroutines automatically get their name as a label
My concern here is whether it introduces a problem with Cgoto foo
vs. Cgoto foo. If, as you propose, subs do get their name as label,
I would like to conflate these two forms. But the semantics of
Cgoto foo
From: John Porter [mailto:[EMAIL PROTECTED]]
Eric Roode wrote:
sub func1
{
func2();
}
sub func2
{
last func1;
}
? Imho, it is a BAD THING for functions to know who called them,
and to vary their behavior accordingly.