in reply to Re^7: howto parse (or determining end) of a line of perl
in thread howto parse (or determining end) of a line of perl
As for how much complexity: 1 line:
Perl could go, *mostly*, sigil-free if it wanted and remain 100% compat w/previous progs.if (/^\w/) { /^\w+=/ and $_='$'.$_ }
I.e. it would still accept sigils, but for vars w/o sigils -- they would be allowed if predeclared and perl would use the predeclared type. If there was ever a case where more than 1 type was declared for 1 name, then a sigil would be required to differentiate them when using one of them. But in most cases where the same name isn't used w/multiple types, perl would already know the intended type as stated in the declaration.
Would likely reduce perl's "line noise" reputation and should be 100% compat w/old code (as old code has to have sigils in place, and when in place, then no predeclared-type-default would be used.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^9: howto parse (or determining end) of a line of perl
by hippo (Archbishop) on Aug 26, 2016 at 15:12 UTC | |
by perl-diddler (Chaplain) on Aug 27, 2016 at 09:01 UTC | |
by hippo (Archbishop) on Aug 28, 2016 at 12:50 UTC | |
by perl-diddler (Chaplain) on Sep 18, 2016 at 21:31 UTC | |
by choroba (Cardinal) on Sep 19, 2016 at 08:51 UTC |