Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^3: What esteemed monks think about changes necessary/desirable in Perl 7 outside of OO staff

by likbez (Sexton)
on Sep 10, 2020 at 20:45 UTC ( [id://11121575]=note: print w/replies, xml ) Need Help??


in reply to Re^2: What esteemed monks think about changes necessary/desirable in Perl 7 outside of OO staff
in thread What esteemed monks think about changes necessary/desirable in Perl 7 outside of OO staff

This node falls below the community's threshold of quality. You may see it by logging in.
  • Comment on Re^3: What esteemed monks think about changes necessary/desirable in Perl 7 outside of OO staff

Replies are listed 'Best First'.
Re^4: What esteemed monks think about changes necessary/desirable in Perl 7 outside of OO staff
by dsheroh (Monsignor) on Sep 11, 2020 at 07:40 UTC
    The classic solution of this problem was invented in FORTRAN in early 50 -- it is a backslash at the end of the line.
    And, again... exactly how much existing Perl 5 code has backslashes at the end of lines (commented or otherwise)? Approximately none. Boom. It breaks.
    Question to you: how many times you corrected missing semicolon in your Perl scripts the last week ?
    That's an easy one: Zero.

    Which isn't to claim that I never forget semicolons, but I generally only get "possible missing semicolon"-type errors from the compiler once every month or two, and the compiler is often wrong about them. (There's still an error in my code, of course, but it's a different error, rather than the missing semicolon that the compiler suspected.)

    Edit: Come to think of it, that closing parenthetical is an even bigger problem with this suggestion. If the compiler thinks I have a missing semicolon, but the real error is actually something else... then that means that, if the compiler says "hey, no problem, I'll just implicitly add that semicolon for you", then the actual error will still be there, undetected, waiting to strike at run-time when I least expect it. That is not an improvement!

Re^4: What esteemed monks think about changes necessary/desirable in Perl 7 outside of OO stuff
by hippo (Bishop) on Sep 10, 2020 at 21:46 UTC
    The classic solution of this problem was invented in FORTRAN in early 50 -- it is a backslash at the end of the line.

    Fortran didn't have a release until 1957 so not early 50s. Fortran prior to F90 used a continuation character at the start (column 6) of the subsequent line not the end of the previous line. The continuation character in Fortran has never been specified as a backslash. Perhaps you meant some other language?


    🦛

      Yes, the first FORTRAN compiler was delivered in April 1957. I was wrong, sorry about it. Still the idea of continuation symbol belongs to FORTRAN, although the solution was different then the one I mentioned.
Re^4: What esteemed monks think about changes necessary/desirable in Perl 7 outside of OO staff
by talexb (Chancellor) on Sep 14, 2020 at 13:09 UTC
      The classic solution of this problem was invented in FORTRAN in early 50 -- it is a backslash at the end of the line. Perl can use #\ as this is pragma to lexical scanner, not the element of the language.

    I took a FORTRAN course at Waterloo in Fall of 1976, and at that time the continuation character was a '+' in column 6. I'd like to know which publication or reference told you that a continuation was a backslash at the end of a line.

    In addition, I'm quite happy with Perl understanding that a line without a semi-colon is continued on the next line. It's the same rule that C uses, so having ';' as a line terminator has made sense to me since 1981. I'm happy to stick with that convention.

    Alex / talexb / Toronto

    Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.

Re^4: What esteemed monks think about changes necessary/desirable in Perl 7 outside of OO staff
by GrandFather (Saint) on Sep 10, 2020 at 21:19 UTC
    how many times you corrected missing semicolon in your Perl scripts the last week

    After running the code - never. All the IDEs I use for all the languages I use flag missing semi-colons and other similar foibles (like mis-matched brackets.

    There are nasty languages that I use occasionally, and even some respectable ones, that need to quote new lines to extend a statement across multiple lines. That is just nasty on so many levels. I very much agree with dsheroh that long lines are anathema. Code becomes much harder to read and understand when lines are long and statements are not chunked nicely.

    Don't break what's not broken!

    Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond
Re^4: What esteemed monks think about changes necessary/desirable in Perl 7 outside of OO staff
by Jenda (Abbot) on Oct 17, 2020 at 18:27 UTC

    That's a classic and incredibly ugly solution.

    Jenda
    1984 was supposed to be a warning,
    not a manual!

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re^4: What esteemed monks think about changes necessary/desirable in Perl 7 outside of OO staff
by gburnore (Initiate) on Oct 31, 2020 at 01:51 UTC

    My concern would be all the code I'd have to hunt thru and change just so someone could not do something I think they should anyway. (Term with semicolons)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11121575]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2024-04-25 11:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found