Highly desirable Make a semicolon optional at the end of the line, if there is a balance of brackets on the line and the statement looks syntactically correct ("soft semicolon", the solution used in famous IBM PL/1 debugging compiler).
Why would this be highly desirable? Consider:
print( "Hello World" ) if( 1 );
versus
print( "Hello World" ) if( 1 < 2 ) { print("Goodbye"); };
Adding your change idea makes the parser even more complex and introduces weird edge cases.
I think even Javascript now recommends using semicolons instead of eliding them at the end of a line.
Update: Some examples where ASI in Javascript goes wrong:
In reply to Re: What esteemed monks think about changes necessary/desirable in Perl 7 outside of OO staff
by Corion
in thread What esteemed monks think about changes necessary/desirable in Perl 7 outside of OO staff
by likbez
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |