Comment by anonnon

Comment by anonnon a day ago

5 replies

Clearly, the "http:" is parsed as a label (for goto), and the subsequent "//", as a C++ or C99 comment. This shouldn't give you more than a moment's pause if you know C.

pwdisswordfishy a day ago

Or if you use a syntax highlighter.

  • anonnon a day ago

    Yes, I don't know why people are downvoting me. Have these people never seen C code using goto-based error handling?

    • dhosek a day ago

      I mean, I’ve not written C code in decades¹ and this didn’t cause a second’s pause.

      1. Long enough ago that the only practical way to get syntax highlighting was to run a separate program on the source code to generate a TeX document.

    • NackerHughes a day ago

      I wouldn't be surprised if a fair majority of them have been taught to see goto as nothing but a vestige of the 70s which should never be used under any circumstances except as a meme or to deliberately obfuscate code.

      I have recently become quite fond of goto-based error handling and find it a lot cleaner and more readable than the if-else-mountains you otherwise end up with. I just make sure to leave a comment with a link to xkcd.com/292 so anyone else reading it knows I'm aware of what I'm doing. Now with this URL trick I can do both in one line. :)

      • elcapitan 18 hours ago

        And the corresponding `goto http` is the chef's kiss :D love it