in reply to Re: Trinary Operator Semantics
in thread Trinary Operator Semantics
Tail recursion would be a great optimization to have, but Perl doesn't do it except through the clunky use of goto BLOCK;. And that doesn't appear to give any time optimization (admittedly, that p5p message could be long out of date).
I don't think there's any support for the idea that until the Perl6 effort, Perl was anything but ad hoc design. The difficulties in dis-ambiguizing the defined-or operator from an empty regex should be proof of that. The fact that you can't get a context-free grammar for Perl should be proof of that. The steps perl has to go through (and still ocasionally get it wrong) to figure out if map {. . .} @array should contain a block or a hashref should be proof of that.
I don't mean to insult the p5p people, as they make my work easy in many cases. Perl has simply been extended over the years from an awk/sed killer into a part imparative, part functional, part OO language, and that process would inevitably introduce some rather odd designs.
"There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.
|
---|
Replies are listed 'Best First'. | |
---|---|
Tail recursion using goto ⊂ (was: Re^3: Trinary Operator Semantics)
by Joost (Canon) on May 27, 2005 at 16:50 UTC | |
by Roy Johnson (Monsignor) on May 27, 2005 at 17:07 UTC | |
by demerphq (Chancellor) on May 27, 2005 at 17:59 UTC | |
by Joost (Canon) on May 27, 2005 at 17:21 UTC | |
Re^3: Trinary Operator Semantics
by chromatic (Archbishop) on May 27, 2005 at 16:27 UTC | |
Re^3: Trinary Operator Semantics
by kscaldef (Pilgrim) on May 27, 2005 at 16:55 UTC | |
by hardburn (Abbot) on May 27, 2005 at 17:18 UTC |