Re: Clarification on Default Scoping (was Re: C<strict> as default (was Re: RFC 16 (v1)))
[email protected] (Ted Ashton) Mon, 7 Aug 2000 10:45:01 -0400
| Newsgroups | perl.perl6.language.strict |
|---|---|
| Message-ID | <[email protected]> |
Thus it was written in the epistle of [email protected], > > > I do *NOT* think in any way that default Perl 6 should ever require a my(). > > I should probably add here that if this is what you think, you are > certainly doomed to be disappointed, becapse Perl 5 requires my() in > many cases, and this is not going to go away. > > For example, there is no way to write this without my(): > > $x = 2; > if (...) { > my $x = 1; > ... > } > print "$x\n"; > > So I think it might be prudent for you to moderate your demands a little. While I'm not yet prepared to advocate any of the suggestions, *if* lexicals were the default, the above code could be written: $x = 2; if (...) { $x = 1; ... } print "$x\n"; Could it not? Ted -- Ted Ashton ([email protected]), Info Sys, Southern Adventist University ========================================================== The bottom line for mathematicians is that the architecture has to be right. In all the mathematics that I did, the essential point was to find the right architecture. It's like building a bridge. Once the main lines of the structure are right, then the details miraculously fit. The problem is the overall design. -- Dyson, Freeman ========================================================== Deep thoughts to be found at http://www.southern.edu/~ashted