in reply to Re^3: A short whishlist of Perl5 improvements leaping to Perl7
in thread A short whishlist of Perl5 improvements leaping to Perl7
Your example is redundant, cause the obvious rule is that any assignment in a new scope equals a declaration.
That's ludicrous. It would prevent this common construct:
my $x; if (f()) { ... $x = ...; } else { ... $x = ...; }
And this one:
my $found; for (...) { if (...) { $found = ... } }
And this one:
my @a; while (...) ... push @a, ...; }
I don't think any program I've ever written would work!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: A short whishlist of Perl5 improvements leaping to Perl7
by LanX (Cardinal) on Nov 29, 2020 at 10:24 UTC | |
by ikegami (Pope) on Nov 29, 2020 at 20:40 UTC | |
by LanX (Cardinal) on Nov 29, 2020 at 21:17 UTC | |
by ikegami (Pope) on Dec 01, 2020 at 08:32 UTC |